答案 0 :(得分:12)
答案 1 :(得分:1)
我想尝试:
for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
UIManager.setLookAndFeel(info.getClassName());
System.out.println("CHOSEN THIS");
break;
}
答案 2 :(得分:0)
答案 3 :(得分:0)
要设置Nimbus外观,请在主方法中添加此代码
try {
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (Exception e) {
e.printStackTrace();
}