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 wa开发者_如何学编程y ? Thank you.
this works:
labelDefault.put("Label[Enabled].textForeground", new ColorUIResource(210, 210, 210));
精彩评论