Results 1 to 5 of 5

Thread: Java Swing L&F on Gnome

  1. #1
    Join Date
    Oct 2005
    Beans
    3

    Java Swing L&F on Gnome

    Hello,
    I've installed Ubuntu Breezy and Java 1.5.
    I've got two questions :
    1)I've a big problem : Swing apps doesn't look like normal Swing apps (with the Ocean default look&feel) when i'm on Gnome. They get a GTK (not GTK++) like look&feel and that's quite horrible !
    When I'm on KDE, they look like normal.

    2)How can i desinstall GCJ/GIJ ? When i try to desinstall GIJ, Synaptic said me that openoffice2 and ubuntu-desktop !! must be removed...

    Thanks for your answers and sorry for my english, i'm french.

  2. #2
    Join Date
    Oct 2004
    Location
    Portugal, Europe
    Beans
    42

    Re: Java Swing L&F on Gnome

    Quote Originally Posted by InfoRital
    Swing apps doesn't look like normal Swing apps (with the Ocean default look&feel) when i'm on Gnome. They get a GTK (not GTK++) like look&feel and that's quite horrible !
    To user the default L&F:
    Code:
    UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
    To use the system L&F:
    Code:
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    "I'd crawl over an acre of 'Visual This++' and 'Integrated Development That' to get to gcc, Emacs, and gdb. Thank you."
    -- Vance Petree, Virginia Power

  3. #3
    Join Date
    Oct 2005
    Beans
    3

    Re: Java Swing L&F on Gnome

    Thanks but i know that. The problem isn't in my applications (i don't develop Swing applications) but in applications that i haven't the source code and which are not mine.
    For example, when i launch "javaws", it looks like that

  4. #4
    Join Date
    Oct 2004
    Location
    Portugal, Europe
    Beans
    42

    Re: Java Swing L&F on Gnome

    javaws is using the system default L&F, and Sun hasn't come up with a decent GTK look & feel yet, so it's using the "old" GTK widgets design. It's disgusting, you're right! And because the software isn't free, you can't change that behaviour.

    But that's specific to that application. Other Swing apps. (hopefully) won't follow that regrettable design decision, and won't be bind to a particular L&F. Look for command-line options that may allow you to change the L&F - try executing "<app.> --help" on the CLI to see if there's such an option. On certaing Swing apps. (like the Netbeans IDE) you can pass a parameter to the application to choose the L&F.

    "I'd crawl over an acre of 'Visual This++' and 'Integrated Development That' to get to gcc, Emacs, and gdb. Thank you."
    -- Vance Petree, Virginia Power

  5. #5
    Join Date
    Oct 2005
    Beans
    3

    Re: Java Swing L&F on Gnome

    Thanks for your reply.

    Yes some applications follow that design decision and some others don't.
    I've found that you can set the defaut L&F for all Java applications. You must make a swing.properties file in the lib/ directory of your jre. And you can set the default l&f in this file.

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
  •