Skip to content

LookAndFeel in ALL apps

To set your favorite LAF in all Java apps, you can create a file swing.properties in your jre/lib[^1] folder with following contents:

swing.laf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
swing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel

You can also set the _JAVA_OPTIONS environment variable to the following (or just specify these parameters upon the java-call):

-Dswing.laf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel -Dswing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel

From now on you will see NimbusLookAndFeel in all Java applications which do not set a LAF on their own.

Available LookAndFeels as of 1.6:

  • com.sun.java.swing.plaf.gtk.GTKLookAndFeel
  • com.sun.java.swing.plaf.motif.MotifLookAndFeel
  • com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
  • com.sun.java.swing.plaf.windows.WindowsLookAndFeel
  • javax.swing.plaf.basic.BasicLookAndFeel
  • javax.swing.plaf.metal.MetalLookAndFeel
  • javax.swing.plaf.multi.MultiLookAndFeel
  • javax.swing.plaf.synth.SynthLookAndFeel

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

Markdown format allowed
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options