我正在使用 NetBeans 用 Java 开发 GUI,我喜欢将禁用按钮的文本颜色更改为黑色。
以下命令在组合框上运行良好:
UIManager.getDefaults().put("ComboBox.disabledForeground", Color.BLACK);
对于按钮,以下命令无效:
UIManager.getDefaults().put("Button.disabledForeground", Color.BLACK);
or
UIManager.getDefaults().put("Button.disabledText", Color.BLACK);
我希望有人能帮助我。
先感谢您。
Steffen
UIManager.getDefaults().put("Button.disabledText",Color.RED);
为我工作
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)