0

I'm trying to overrides some of the nimbus properties for JLabel.

UIDefaults labelDefault = new UIDefaults();
    labelDefault.put("Label.font", new FontUIResource("Arial", Font.PLAIN, 14));
    labelDefault.put("Label.foreground", new ColorUIResource(210, 210, 210));
label.putClientProperty("Nimbus.Overrides", labelDefault);
    label.putClientProperty("Nimbus.Overrides.InheritDefaults",false);

For the font it works correctly, but not for the color. Is it possible to change the color this way ? Thank you.

mKorbel
  • 109,525
  • 20
  • 134
  • 319
wotan2009
  • 9
  • 2

1 Answers1

1

this works:

labelDefault.put("Label[Enabled].textForeground", new ColorUIResource(210, 210, 210));
oliholz
  • 7,447
  • 2
  • 43
  • 82