Results 1 to 4 of 4

Thread: Java swing default look and feel

Hybrid View

  1. #1
    Join Date
    Jun 2011
    Location
    Netherlands
    Beans
    146
    Distro
    Ubuntu

    Java swing default look and feel

    When I run a java swing application, the metal look and feel is detected as the default one. My swing.properties file looks like this:
    Code:
    me@pc:~$ cat /etc/java-7-openjdk/swing.properties 
    # uncomment to set the default look and feel to GTK
    swing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
    Back at the time I used Gnome2 in Ubuntu 10.10, it just worked. Now since I upgraded to Xubuntu 12.04 it doesn't work anymore.
    I really want to change it, because I think the metal look and feel is really ugly.

  2. #2
    Join Date
    Feb 2010
    Beans
    24

    Re: Java swing default look and feel

    Probably a dumb question, but what version of java are you running? Are you using the java that's in that location?

  3. #3
    Join Date
    Jun 2011
    Location
    Netherlands
    Beans
    146
    Distro
    Ubuntu

    Re: Java swing default look and feel

    On my laptop I only have openjdk 7 installed. On my pc I have both 6 and 7 installed (because one program depends on 6), but 7 is the default.

  4. #4
    Join Date
    Oct 2007
    Beans
    14

    Re: Java swing default look and feel

    I'm seeing the same - I have both OpenJDK 6 and 7. Starting apps under 6 looks much nicer than 7, mostly because Java 7 has nasty looking bold fonts.

    Comparing the default system properties of Java 6 and Java 7, the only related difference seems to be that Java 7 has

    Code:
    awt.toolkit = sun.awt.X11.XToolkit
    Changing this value just breaks things as I can't seem to use any of the other available toolkits.

    Comparing /etc/java-6 and /etc/java-7 reveals nothing useful, in particular, swing.properties files are identical (and nothing but comments).

    Changing the look and feel :

    Motif : hideous and cyan

    Windows : absent

    GTK is the same as the System look and feel and is apparently just much uglier in Java 7 than it is in Java 6.

    Metal : nicer fonts but hideous chrome.

    Nimbus : dies with a NullPointerException (running JConsole)

    Examining the source ; nothing obvious in "com.sun.java.swing.plaf.gtk" that would cause the GTK look and feel to have those nasty bold fonts.

    So I'm stumped. Bah.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •