码迷,mamicode.com
首页 > 编程语言 > 详细

Java Swing中Substance个人比较喜欢的两种组合

时间:2016-04-30 23:34:33      阅读:635      评论:0      收藏:0      [点我收藏+]

标签:

try {
            // 设置外形装饰为可装饰
            JFrame.setDefaultLookAndFeelDecorated(true);
            // 设置外观
            UIManager.setLookAndFeel(new SubstanceBusinessBlackSteelLookAndFeel());
            // 设置主题
            SubstanceLookAndFeel.setCurrentTheme(new SubstanceBottleGreenTheme());
            // 设置皮肤
            SubstanceLookAndFeel.setSkin(new FindingNemoSkin());
            // 设置按钮外观
            SubstanceLookAndFeel.setCurrentButtonShaper(new StandardButtonShaper());
            // 设置水印
            SubstanceLookAndFeel.setCurrentWatermark(new SubstanceStripeWatermark());
            // 设置边框
            SubstanceLookAndFeel.setCurrentBorderPainter(new StandardBorderPainter());
            // 设置渐变渲染
            SubstanceLookAndFeel.setCurrentGradientPainter(new StandardGradientPainter());
            // 设置标题
            SubstanceLookAndFeel.setCurrentTitlePainter(new MatteHeaderPainter());
        } catch (UnsupportedLookAndFeelException ex) {
            ex.printStackTrace();
        }
try {
            // 设置外形装饰为可装饰
            JFrame.setDefaultLookAndFeelDecorated(true);
            // 设置外观
            UIManager.setLookAndFeel(new SubstanceLookAndFeel());
            // 设置主题
            SubstanceLookAndFeel.setCurrentTheme(new SubstanceEbonyTheme());
            // 设置皮肤
            SubstanceLookAndFeel.setSkin(new NebulaBrickWallSkin());
            // 设置按钮外观
            SubstanceLookAndFeel.setCurrentButtonShaper(new ClassicButtonShaper());
            // 设置水印
            SubstanceLookAndFeel.setCurrentWatermark(new SubstanceBinaryWatermark());
            // 设置边框
            SubstanceLookAndFeel.setCurrentBorderPainter(new StandardBorderPainter());
            // 设置渐变渲染
            SubstanceLookAndFeel.setCurrentGradientPainter(new StandardGradientPainter());
            // 设置标题
            SubstanceLookAndFeel.setCurrentTitlePainter(new FlatTitlePainter());
        } catch (UnsupportedLookAndFeelException ex) {
            ex.printStackTrace();
        }

 

Java Swing中Substance个人比较喜欢的两种组合

标签:

原文地址:http://www.cnblogs.com/tufujie/p/5449586.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!