substance改变界面的皮肤和主题

下载下来substance.jar包后,解压JAR文件,可以看到在“org/jvnet/substance/skin”下有下面这些皮肤(以LookAndFeel.class结尾的文件)。
共有22种皮肤,69种主题,自己设置




static {
        try {
            try {
                UIManager.setLookAndFeel(new SubstanceLookAndFeel());
            } catch (UnsupportedLookAndFeelException ex) {
               System.out.println(ex.getMessage());
            }
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
        //设置皮肤
      //  SubstanceSaharaLookAndFeel.setSkin(new CremeSkin());
        SubstanceSaharaLookAndFeel.setSkin(new AutumnSkin());
        //SubstanceSaharaLookAndFeel.setCurrentButtonShaper(new StandardButtonShaper());
        //SubstanceSaharaLookAndFeel.setFontPolicy(new DefaultMacFontPolicy());
        //设置水印
        SubstanceLookAndFeel.setCurrentWatermark(new SubstanceBubblesWatermark());
        //设置主题
       // SubstanceLookAndFeel.setCurrentTheme(new SubstanceCremeTheme());
      SubstanceLookAndFeel.setCurrentTheme(new SubstanceLightAquaTheme());
     //  SubstanceLookAndFeel.setCurrentTheme(new SubstanceOliveTheme());

     //  SubstanceLookAndFeel.setCurrentTheme(new SubstanceJadeForestTheme());
        //设置题头
        SubstanceLookAndFeel.setCurrentTitlePainter(new Glass3DTitlePainter());

你可能感兴趣的:(BST)