快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

Javaswing几种常用的样式设置

// Metal风格 (默认)
        String lookAndFeel = "javax.swing.plaf.metal.MetalLookAndFeel";
        UIManager.setLookAndFee(lookAndFeel);
// Windows风格
        String lookAndFeel = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
        UIManager.setLookAndFee(lookAndFeel);  

// Windows Classic风格
        String lookAndFeel = "com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel";
        UIManager.setLookAndFee(lookAndFeel);  

// Motif风格
        String lookAndFeel = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";
        UIManager.setLookAndFeel(lookAndFeel);

// Mac风格 (需要在相关的操作系统上方可实现)
        String lookAndFeel = "com.sun.java.swing.plaf.mac.MacLookAndFeel";
        UIManager.setLookAndFeel(lookAndFeel);

// GTK风格 (需要在相关的操作系统上方可实现)
        String lookAndFeel = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
        UIManager.setLookAndFeel(lookAndFeel);

// 可跨平台的默认风格
        String lookAndFeel = UIManager.getCrossPlatformLookAndFeelClassName();
        UIManager.setLookAndFeel(lookAndFeel);

// 当前系统的风格
        String lookAndFeel = UIManager.getSystemLookAndFeelClassName();
        UIManager.setLookAndFeel(lookAndFeel);

文章名称:Javaswing几种常用的样式设置
文章起源:http://6mz.cn/article/pipgei.html

其他资讯