Questions tagged [uimanager]

UIManager manages the current look and feel and its defaults.

The UIManager manages the current look and feel, the set of available look and feels, PropertyChangeListeners that are notified when the look and feel changes, look and feel defaults, and convenience methods for obtaining various default values.

Specifying the look and feel

The look and feel can be specified in two distinct ways: by specifying the fully qualified name of the class for the look and feel, or by creating an instance of LookAndFeel and passing it to setLookAndFeel.

Setting the look and feel to the system look and feel:

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

Setting the look and feel based on class name:

UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");

Defaults

UIManager manages three sets of UIDefaults. They are:

1. Developer defaults - With few exceptions Swing does not alter the developer defaults; these are intended to be modified and used by the developer.
2. Look and feel defaults - The look and feel defaults are supplied by the look and feel at the time it is installed as the current look and feel (setLookAndFeel() is invoked). The look and feel defaults can be obtained using the getLookAndFeelDefaults() method.
3. System defaults - The system defaults are provided by Swing.

179 questions
1
vote
1 answer

Change Tooltips with Nimbus

I'm trying to change globaly the size of my tooltips. I'm using : UIManager.put("ToolTip.font", new Font("SansSerif",Font.PLAIN,25)); Which work just fine in general. But in my case, I'm using Nimbus LaF with this code : …
Darksharcoux
  • 111
  • 1
  • 6
1
vote
2 answers

UIManager.getColor returns null sometimes

I have an applet that is generating a nullpointer exception at this line (but only sometimes) at load time: (txtpnNoSeHa is a JEditorPane inside a class that extends JPanel. This panel is instantiated inside the applet…
dabicho
  • 383
  • 4
  • 19
1
vote
1 answer

Error when changing the look and feel(UIManager) of the swing application

Hello I have an interface which user can change the look and feel . Here is the interface: http://www.hostingpics.net/viewer.php?id=579250themesApp.jpg and the code of each button: //The JDesktop Frame contains all the Internal Frames JDesktop p =…
Majda
  • 99
  • 1
  • 3
  • 11
1
vote
1 answer

what do these swing color names mean

Some of the names are clear, like background, foreground, focus etc. But some are just confusing, like light, hightlight, shadow, darkshardow etc. I noticed that these are consistently used in swing UI, so I infer these are part of java's jargon. …
ShaggyInjun
  • 2,880
  • 2
  • 31
  • 52
1
vote
1 answer

Java UIManager - Change ComponentsStyle

I want to change my componentstyle by using UIManager. For example: I click on a Button and the Button foreground changes from black to green. The same for a JCheckbox..... In my example the changes just work for the Button.gradient.... I get no…
JavaNullPointer
  • 1,199
  • 5
  • 21
  • 43
1
vote
2 answers

Use SyntheticaBlackEye with java 7

I want to use the look and feel named SyntheticaBlackEye with my java application, so I downloaded the jar files of the look and feel from here then I put the jar file inside the library folder of my project then I set the look and feel like as…
Eslam Hamdy
  • 7,126
  • 27
  • 105
  • 165
1
vote
1 answer

How to reset panel look and feel in java?

Possible Duplicate: Panel losing color When I click on the button that activates the file chooser, and add the resulting file the panel color disappears couse using uimanager to display file chooser as windows chooser. import…
Yaser Har
  • 149
  • 1
  • 2
  • 11
1
vote
3 answers

How to change background color of JTabbedPane in runtime?

I have founds loads of examples that change the background color of JTabbedPane using either setBackgroundAt() and UIManager.put("JTabbedPane...") However, I want to create an onclick event on a checkbox that changes the background color to green…
Shervin Asgari
  • 23,901
  • 30
  • 103
  • 143
1
vote
3 answers

Swing: Resizing RadioButton

I need to implement font size switching in my app. But when I increase font's size RadioButtons remain same size and on small screen with high resolution my customer just can't hit it easily. Is there a way to resize RadioButton's round thing…
Aleksandr Kravets
  • 5,750
  • 7
  • 53
  • 72
1
vote
3 answers

how to increase the size of jspinner arrows as per touch screen requirements on desktop

Hi Can anybody help me to how to increase the size of jspinner arrows as per touch screen requirements on desktop
1
vote
3 answers

Location of String keys in L&F

There are several components in Java that have predefined look and strings of text that are automatically printed on them. Examples is JFileChooser. Also, there is a JDialog (or JOptionPane) that pops up when you try to do illegale rename in…
Ivan Karlovic
  • 221
  • 5
  • 14
1
vote
1 answer

Overriding LookAndFeel

Hello I am trying to change the colors of my swing progress bar in java. Initially I tried using the following code: UIManager.put("ProgressBar.selectionBackground", Color.black); UIManager.put("ProgressBar.selectionForeground",…
whomaniac
  • 1,258
  • 4
  • 15
  • 22
1
vote
1 answer

Localization and L&Fs

I thought it would be nice if I gave the user the ability to choose and switch between "themes" (L&Fs). I'd give him a choice between Java metal (default), System default, and maybe a couple more I'll download from the internet... My application is…
Ivan Karlovic
  • 221
  • 5
  • 14
0
votes
1 answer

how do you change the color scheme of a basicComboBoxUI?

How do you change the color scheme of a basic ComboBox UI? I what I've tried is: setForeGround, setBackground, setOpaque(true), setOpaque(false) setBorder. But none of these work. My code right now is: weaponCB.setBounds(27,250,150,30); …
Russell
  • 795
  • 11
  • 18
0
votes
1 answer

Jtable Look and feel of editing cell

There is a JTable with DefaultTableModel. There is table's setforeground, setbackground and setselectioncolor methods. Also when you are editing the cell you have table.setDefaultEditor(Object.class, new DefaultCellEditor(field)) method to change…
Usman Ahmed
  • 79
  • 2
  • 3
  • 11