Changing java swing look and feel

To run, say, the wmqttSample java application using the gtk look and feel for swing:

  • java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -jar wmqttSample.jar

Thanks to Andy Piper.

Also, from http://seysayux.wordpress.com/2009/01/11/make-java-use-the-gtk-look-feel-on-linux/ :

First, you’ll have to locate the directory your JVM is residing in. Unless your distribution did some real weird things, it’s usually either /usr/lib/jvm/<version> or /usr/java/[<version>] . Wherever it might be located, i’ll use /usr/lib/jvm/jre-1.6.0_10/ for the examples.

Locate the file named /usr/lib/jvm/jre-1.6.0_10/lib/swing.properties. If it doesn’t exist, create it.

Put the following inside the file:

swing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel

3 Responses to “Changing java swing look and feel”

  1. Andy Piper Says:

    I’ve actually thought of a third way of doing this. You could add the -Dswing.defaultlaf parameter to the Java runtime parameters settings in the Java Control Panel.

  2. Roger Says:

    Good point.

  3. PETER Says:

    PillSpot.org. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.Pillspot.org. Herbal-supplements@buy.online” rel=”nofollow”>.…

    Categories: Antibiotics.Eye Care.Anti-allergic/Asthma.Weight Loss.Pain Relief.Vitamins/Herbal Supplements.Antidepressants.Stop SmokingWomens Health.Mens Health.Antidiabetic.Skin Care.Stomach.Mental HealthBlood Pressure/Heart.Anxiety/Sleep Aid.Anti…

Leave a Reply

CAPTCHA Image CAPTCHA Audio
Refresh Image