1、先获取当前系统支持的观感样式
1 UIManager.LookAndFellInfo[] infos = UIManager.getInstalledLookAndFeels(); 2 3 String className = infos[i].getClassName();
2、设置当前窗体的观感
UIManager.setLookAndFeel(className); SwingUtilties.updateComponentTreeUI(frame);
时间: 2024-10-10 14:19:27