UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());//当前系统风格
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");//windows风格
UIManager.setLookAndFeel("javax.swing.plaf.windows.WindowsLookAndFeel");//windows风格
UIManager.setLookAndFeel("com.apple.mrj.swing.MacLookAndFeel");//现在在我的机器上没有特殊显示,有待有兴趣的朋友考察,并多谢告知
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());//跨平台的Java界面风格,不太明白这种说法
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");//java风格
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");//Nimbus风格,新出来的外观,jdk6 update10版本以后的才会出现
UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");//Motif风格,外观接近windows经典,但宽宽大大,而且不是黑灰主色,而是蓝黑
本文介绍了如何使用Java Swing库中的UIManager来设置不同的用户界面风格,包括系统默认风格、Windows风格、Mac风格、跨平台风格、Java原生Metal风格、新式Nimbus风格以及Motif风格等。
128

被折叠的 条评论
为什么被折叠?



