您的位置:首页 > Web前端 > CSS

swing下 改变窗口样式为windows风格(swing控件样式不美观解决方案)

2011-03-02 15:53 369 查看
在windows环境下可以用下面两种方法使窗口显示windows风格窗口!

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

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

public static void main(String[] args) {

try

{

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

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

}catch(Exception e)

{}

new MyFrame();

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: