swing Jframe 界面风格
程序员文章站
2024-02-01 11:44:40
用法:在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);
上一篇: Swift - 绘制背景线条
推荐阅读
-
swing Jframe 界面风格
-
Java~Swing中下拉式菜单JMenuBar(菜单栏)、JMenu(菜单)和JMenuItem(菜单项)的使用
-
Swing学习20:Java Swing JFileChooser和JColorChooser
-
swing常用的布局
-
Swing选项卡(JTabbedPane)自定义选项卡样式
-
Java Swing组件和容器
-
JavaGUI——swing组件基础(七)选项卡窗格JTabbedPane
-
Swing学习02:Java Swing JFrame和JPanel
-
Swing选项卡(JTabbedPane)的使用
-
Swing应用程序中的JavaFX 8 DatePicker