请问如何使用substance.jar来改变application的界面皮肤? 指点一下啊! 最好有代码哦

解决方案 »

  1.   

    在main方法中写:
    try{
      UIManager.setLookAndFeel("你的lookandfeel的全类名");
    }catch(Exception e){
      e.printStackTrace();
    }
      

  2.   

    把substance.jar加到classpath后public static void main(String[] args) {
        JFrame.setDefaultLookAndFeelDecorated(true);
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            try {
              UIManager.setLookAndFeel(new SubstanceLookAndFeel());
            } catch (Exception e) {
              System.out.println("Substance Raven Graphite failed to initialize");
            }        // 以下自己的主窗口
            JFrame w = new JFrame(“Demo”);
            w.setVisible(true);
          }
        });
      }
      

  3.   

    Substance look and feel - getting started