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
0
votes
0 answers

How to change the color of the JTabbedPane tabheader?

We got a homework where we should code a table program. I am trying to make a small excel program. My question is how to change the color of the JTabbedHeader. Here a picture so you can see what part I mean.The red highlited part I have found out…
KaNaDa
  • 141
  • 12
0
votes
0 answers

How would I install a look and feel from an external jar in Java Swing with UIManager and Classloader?

I'm trying to add a plugin system where people can install their own custom looks and feels. I'm not sure how I'd actually install it so it could be found by going through UIManager.getInstalledLookAndFeels()? I've tried this: public static void…
Hello234
  • 175
  • 2
  • 12
0
votes
1 answer

Symbol not found when adding LnF JAR

package app; import javax.swing.UIManager; import com.seaglasslookandfeel.*; public class App { public static void main(String[] args { …
Josh
  • 164
  • 4
  • 16
0
votes
1 answer

Look and Feel without hard coded values

Right now I set the LaF like this: UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); It works fine and gives the look and feel I want to have. Sadly at some point in my code, I have to set some icons manually, because the…
XtremeBaumer
  • 6,275
  • 3
  • 19
  • 65
0
votes
2 answers

How to set undecorated JTattoo look-and-feel JFrame?

How to set undecorated JTattoo used JFrame? I've tried this, but it does not work. undecorated(true); how to make frame undecorated after jTattoo theme installed this is a same question and not clear answer. How to undecorate JFrame while using…
Udeesha Induwara
  • 605
  • 1
  • 10
  • 20
0
votes
1 answer

How do I customize a JSlider to have a larger "thumb"?

I have a Java GUI that I'm developing and I've run into a snag with regard to the default size of the "thumb" on a JSlider I need for user input for the simple and unavoidable reason that the application has to run on a touch-screen, there is no…
Richard T
  • 4,570
  • 5
  • 37
  • 49
0
votes
2 answers

Java UIManager - What's the name of the area around a button

I'm using the Windows XP look and feel. On a panel containing a button there is a rectangular area around a button that looks like the area that a classic button would take up. That area is not adhering to the color of my panel. For example I'm…
soulTower
  • 181
  • 1
  • 2
  • 10
0
votes
0 answers

SWING - With MigLayout and Label.font set to SimSun, Java fails to render the underline of a JLabel containing HTML tag

If I have a JLabel with tag, such as text, with WindowsLookAndFeel and WindowsClassicLookAndFeel the underline is not rendered. I have reported this bug. If no Look and Feel is set, or with Nimbus, all correct. I know I can set the…
WesternGun
  • 11,303
  • 6
  • 88
  • 157
0
votes
0 answers

java UIManager defaults

I've been working on a custom themed UI using the UIManager to style my frames, but I'm stuck trying to figure out what I need to do in order to get this border looking proper. Custom UI
Daniel
  • 1
0
votes
2 answers

Java Swing UIManger causes slowness

I experienced a weird issue in my real time stock prices GUI java application. The problem is this code: InputMap im = (InputMap)UIManager.get("Button.focusInputMap"); im.put(KeyStroke.getKeyStroke("pressed SPACE"),…
vmuser
  • 51
  • 1
0
votes
1 answer

Java Swing UIManager Key

I'm learning Swing for the first time and I'm trying to change the colors of individual components using UIManager.put("key", value), but I'm having trouble trying to figure out how to change the color of specific components because I don't know…
0
votes
1 answer

Java Swing Print Dialog GroupLayout label color

I have used the UIManager to style my application UI so far. All is well except in my printing dialog, created using ServiceUI.printDialog. I see it has inherited much of my UI style e.g. the dark background and white text, but the problem is the…
petehallw
  • 1,014
  • 6
  • 21
  • 49
0
votes
2 answers

Java Windows UIManager

I'm attempting to use the UIManager in java to make all my pop up GUIs and error GUIs use the same colors. The issue is I can't seem to change the button color when using the windows style, as well I can't manage to change the GUIs title bar. Code:…
DarkGuardsman
  • 126
  • 4
  • 15
0
votes
2 answers

UIManager and JCheckBox icon

My GUI has JTable with column that has boolean type which is being showed as a JCheckBox. Metal colors don't suit to my GUI, so I used next code: ImageIcon icon = new…
Exide
  • 61
  • 1
  • 7
0
votes
2 answers

doing something when right clicking outside JPopupMenu (UIManager issue)

I am currently attempting to display a JPopupMenu when right clicking a JTable. I have achieved this in different ways already, but none of them allow me to do what this question is about: executing some code after I right click on the table, but…
RaKXeR
  • 152
  • 2
  • 16