我有一个Swing JButton,同时在我的项目中也使用了以下代码:
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
现在,当尝试使用btnNewButton.setBackground(Color.RED);
为一个按钮更改背景时,它不会变成红色,只有边框会变成红色。
如何在仍然使用UIManager.getSystemLookAndFeelClassName()
的情况下将此背景变为红色以适用于其他组件/项目?