0

GUI of the Project I'm working on uses Nimbus lookandfeel. I can't change it. It effects too much things. on the other hand, I also need to change lots of color properties.

So I want to use Nimbus and edit some properties

But:

When I use

UIManager.setLookAndFeel(info.getClassName());
UIManager.installLookAndFeel(info);

UIManager.put("Label.background", colorA);
UIManager.put("Panel.background", colorA);
UIManager.put("CheckBox.background", colorA);
UIManager.put("TextField.background", colorA);
.
.

some of the properties does not change. I believe UIManager.put can not override lookandfeel properties. For example, JPanel backrounds stay grey, instead of colorA.

Thanks!

Null Pointer
  • 344
  • 1
  • 2
  • 11
  • Nimbus uses a bunch of keys for managing it's state, [for example](http://stackoverflow.com/questions/24504013/changing-the-defauls-key-values-for-jbutton-in-nimbus-laf/24504387#24504387) and [example](http://stackoverflow.com/questions/24379251/change-ui-lookup-for-progressbar-swing-in-nimbus-theme/24379428#24379428) just for starters – MadProgrammer Feb 02 '17 at 08:15
  • @MadProgrammer As I said some of them do not work. Like: UIManager.getLookAndFeelDefaults().put("Label.background", black); UIManager.getLookAndFeelDefaults().put("Label.foreground", lightGray); with these commands, label background turns to black, but foreground do not turn to lightgray. They are still black. I changed almost anything I thought of to lightgray. Still does not effect foreground of the labels. – Null Pointer Feb 02 '17 at 18:02
  • I even tried doing this in a new project. Please create a new project with a label inside a panel. I can't change label font color. – Null Pointer Feb 02 '17 at 18:02
  • Also, UIManager.getLookAndFeelDefaults().put("textForeground", lightGray); is not an option, because if this is set, it effects all other components. For example a textfield can not have other color then lightGrey. – Null Pointer Feb 03 '17 at 08:26

0 Answers0