swing Jframe 界面风格
程序员文章站
2022-05-28 22:29:54
用法:在jframe里面 ......
用法:在jframe里面
uimanager.setlookandfeel("com.sun.java.swing.plaf.windows.windowslookandfeel");
1、metal风格 (默认) string lookandfeel = "javax.swing.plaf.metal.metallookandfeel"; uimanager.setlookandfee(lookandfeel); 2、windows风格 string lookandfeel = "com.sun.java.swing.plaf.windows.windowslookandfeel"; uimanager.setlookandfee (lookandfeel); 3、windows classic风格 string lookandfeel = "com.sun.java.swing.plaf.windows.windowsclassiclookandfeel"; uimanager.setlookandfeel(lookandfeel); 4、motif风格 string lookandfeel = "com.sun.java.swing.plaf.motif.motiflookandfeel"; uimanager.setlookandfeel(lookandfeel); 5、mac风格 (需要在相关的操作系统上方可实现) string lookandfeel = "com.sun.java.swing.plaf.mac.maclookandfeel"; uimanager.setlookandfeel(lookandfeel); 6、gtk风格 (需要在相关的操作系统上方可实现) string lookandfeel = "com.sun.java.swing.plaf.gtk.gtklookandfeel"; uimanager.setlookandfeel(lookandfeel); 7、可跨平台的默认风格 string lookandfeel = uimanager.getcrossplatformlookandfeelclassname(); uimanager.setlookandfeel (lookandfeel); 8、当前系统的风格 string lookandfeel = uimanager.getsystemlookandfeelclassname(); uimanager.setlookandfeel(lookandfeel);