我是第一次学习Swing,并尝试使用以下命令更改单个组件的颜色
UIManager.put("key", value),但我很难弄清楚如何更改特定组件的颜色,因为我不知道它们到底叫什么,也就是标题和关闭按钮所在的栏。任何帮助都将不胜感激!
发布于 2017-07-22 18:44:44
要了解当前外观中可以更改的内容,您可以尝试:
UIManager.getDefaults().entrySet().stream().sorted((o1, o2) -> {
return o1.getKey().toString().compareTo(o2.getKey().toString());
}).forEach(entry -> {
System.out.print(entry.getKey());
System.out.print(" ---> ");
System.out.println(entry.getValue());
});https://stackoverflow.com/questions/45253045
复制相似问题