[Java] 87 Swingコンポーネントの形状変更 Look&Feel

結構使いそうなのでメモ書きしておきます。

import javax.swing.UIManager;

void setLAF() {
		try {
			System.out.println(UIManager.getSystemLookAndFeelClassName());
			// UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
			UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
			// javax.swing.plaf.metal.MetalLookAndFeel
			// com.sun.java.swing.plaf.gtk.GTKLookAndFeel
			// com.sun.java.swing.plaf.motif.MotifLookAndFeel
			// com.sun.java.swing.plaf.windows.WindowsLookAndFeel
		} catch (Exception e) {
			e.printStackTrace();
		}
}