时间:2011-01-06 17:13:53

标签: java swing nimbus

4 个答案:

答案 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();
    }