Swing 设置windows 风格

try {
	UIManager.setLookAndFeel(“com.sun.java.swing.plaf.windows.WindowsLookAndFeel”);//Windows风格
	//UIManager.setLookAndFeel(“com.sun.java.swing.plaf.motif.MotifLookAndFeel”) ; //Mac风格
	//UIManager.setLookAndFeel(“javax.swing.plaf.metal.MetalLookAndFeel”) ;//Java默认风格
} catch (ClassNotFoundException ex) {
	ex.printStackTrace();
} catch (InstantiationException ex) {
	ex.printStackTrace();
} catch (IllegalAccessException ex) {
	ex.printStackTrace();
} catch (UnsupportedLookAndFeelException ex) {
	ex.printStackTrace();
}



你可能感兴趣的:(java,windows,swing,sun)