Java native L&F

Java

Public Domain

Get the OS's native look-and-feel for Swing GUIs

Download (right click, save as, rename as appropriate)

Embed

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// apply the OS's L&F
		try
	    {
	        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
	    }
	    catch(ClassNotFoundException err) {}
	    catch(InstantiationException err) {}
	    catch(IllegalAccessException err) {}
	    catch(javax.swing.UnsupportedLookAndFeelException err) {
	        System.err.println("Error: Unsupported look and feel");
	    }