Java Swing – Set Look and Feel

Swing

How to set the look and feel for a Swing application?
The Java Development Kit contains a few look and feel classes (i.e. subclasses of the LookAndFeel class)

com.sun.java.swing.plaf.gtk.GTKLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
com.sun.java.swing.plaf.windows.WindowsLookAndFeel
com.sun.java.swing.plaf.motif.MotifLookAndFeel

You can set any of these by calling the setLookAndFeel() method of the UIManager

If you want the application to adjust to the platform it is currently running on, you can specify that the look and feel for the current system should be used:

Share This Post On: