swing Jframe 界面風格

用法:在jframe裏面java

 UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");

一、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.setLookAndFeel(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);
相關文章
相關標籤/搜索