开发者

overrides nimbus properties

开发者 https://www.devze.com 2023-03-02 04:47 出处:网络
I\'m trying to overrides some of the nimbus properties for JLabel. UIDefaults labelDefault = new UIDefaults();

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));
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号