Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Desktop Environments
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Desktop Environments
Support for your Ubuntu desktop. Including Gnome, KDE and XFCE.

 
Thread Tools Display Modes
Old July 11th, 2005   #1
Strife
A Carafe of Ubuntu
 
Join Date: May 2005
Beans: 96
Gnome forcing a crappy Java look and feel

So I am running a couple of Java applications, but when running it in Gnome, a crappy-looking excuse for an attempt to emulate Gtk is selected as the default look and feel for each app. However, since the default look and feel shows up in other environments (e.g., the default showed up when running fluxbox), I am fairly sure this is a Gnome issue.

I searched with gconf-editor, but there doesn't appear to be anything with the name 'java' in it anywhere.

Any idea what's forcing this and how I can unforce it?
Strife is offline   Reply With Quote
Old July 11th, 2005   #2
jasmuz
Skinny Soy Caramel Ubuntu
 
jasmuz's Avatar
 
Join Date: May 2005
Location: Santo Domingo, Dominican
Beans: 653
Ubuntu 8.04 Hardy Heron
Send a message via ICQ to jasmuz Send a message via AIM to jasmuz Send a message via MSN to jasmuz Send a message via Yahoo to jasmuz Send a message via Skype™ to jasmuz
Re: Gnome forcing a crappy Java look and feel

Quote:
Originally Posted by Strife
So I am running a couple of Java applications, but when running it in Gnome, a crappy-looking excuse for an attempt to emulate Gtk is selected as the default look and feel for each app. However, since the default look and feel shows up in other environments (e.g., the default showed up when running fluxbox), I am fairly sure this is a Gnome issue.

I searched with gconf-editor, but there doesn't appear to be anything with the name 'java' in it anywhere.

Any idea what's forcing this and how I can unforce it?
What you are talking about is the older version of GTK, wich is rather ugly, but most programs that havent been exported yet to GTK2 rely on this. If it bothers you so much you could download and recompile the program and force it to use Gtk2.
jasmuz is offline   Reply With Quote
Old July 11th, 2005   #3
gil-galad
Ubuntu Extra Shot
 
gil-galad's Avatar
 
Join Date: Mar 2005
Beans: 334
Send a message via AIM to gil-galad
Re: Gnome forcing a crappy Java look and feel

No, what he is talking about is java programs attempting to look like gtk2 apps, and doing a poor job of it. The themes that are supported actually work pretty well. It doesn't really have anything to do with gnome, so there won't be any settings for it. There might be some sort of java config.

I don't really know what you can do about it. Java apps are probably going to look ugly no matter what.
gil-galad is offline   Reply With Quote
Old July 12th, 2005   #4
maruchan
Quad Shot of Ubuntu
 
maruchan's Avatar
 
Join Date: Mar 2005
Beans: 407
Re: Gnome forcing a crappy Java look and feel

Talk to the developers of whatever software it is you're using. It has come to the attention of the Art of Illusion devs that the GTK look and feel is not going to work, so they're considering using (IIRC) jgoodies. I have no idea how it all works, but apparently jgoodies will only be used instead of the GTK laf, and not in other cases.

Good question, and the answer seems to be: Talk to your developers.
maruchan is offline   Reply With Quote
Old July 12th, 2005   #5
Strife
A Carafe of Ubuntu
 
Join Date: May 2005
Beans: 96
Re: Gnome forcing a crappy Java look and feel

No, the answer is not really "talk to the developers" simply because the application does not select a look and feel. Therefore, if something is being forced to use one that is not the default one for Java (instead a default one set elsewhere), then something is wrong other than with the application itself.
Strife is offline   Reply With Quote
Old July 12th, 2005   #6
SteveF
Gee! These Aren't Roasted!
 
Join Date: May 2005
Beans: 192
Re: Gnome forcing a crappy Java look and feel

This comes from the Sun web site. Maybe it will help you out:

Specifying the Look and Feel: Command Line

You can specify the look and feel at the command line by using the -D flag to set the swing.defaultlaf property. For example:

java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKL ookAndFeel MyApp

java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows. WindowsLookAndFeel MyApp

Specifying the Look and Feel: swing.properties

Yet another way to specify the current look and feel is to use the swing.properties file to set the swing.defaultlaf property. This file is located in the lib directory of the Java release. For example, if you're using the Java interpreter in javaHomeDirectory\bin, then the swing.properties file (if it exists) is in javaHomeDirectory\lib. Here is an example of the contents of a swing.properties file:

# Swing properties

swing.defaultlaf=com.sun.java.swing.plaf.windows.W indowsLookAndFeel


How the UI Manager Chooses the Look and Feel

Here are the look-and-feel determination steps that occur when the UI manager first initializes itself:

1. If the program sets the look and feel before any components are created, the UI manager tries to create an instance of the specified look-and-feel class. If successful, all components use that look and feel.

2. If the program hasn't successfully specified a look and feel, then the UI manager uses the look and feel specified by the swing.defaultlaf property. If the property is specified in both the swing.properties file and on the command line, the command-line definition takes precedence.

3. If none of these steps has resulted in a valid look and feel, the program uses the Java look and feel.

Steve
SteveF is offline   Reply With Quote
Old July 12th, 2005   #7
Strife
A Carafe of Ubuntu
 
Join Date: May 2005
Beans: 96
Re: Gnome forcing a crappy Java look and feel

That may be helpful. I'll take a closer look at that later. I guess I should've checked Sun's site before automatically assuming a Gnome problem...

Thanks.
Strife is offline   Reply With Quote
Old July 12th, 2005   #8
Strife
A Carafe of Ubuntu
 
Join Date: May 2005
Beans: 96
Re: Gnome forcing a crappy Java look and feel

Quote:
Originally Posted by Strife
That may be helpful. I'll take a closer look at that later. I guess I should've checked Sun's site before automatically assuming a Gnome problem...

Thanks.
An update on this... I tried editing the swing.properties file to specify the default LAF, but this didn't work. Something, whether it be Gtk or Gnome, is still forcing it to use the damn crappy Gtk lookalike. I also couldn't get the command line way to get it to work, either.

Later on tonight, I'll whip up a test program and try that and see what happens.
Strife is offline   Reply With Quote
Old July 12th, 2005   #9
Strife
A Carafe of Ubuntu
 
Join Date: May 2005
Beans: 96
Re: Gnome forcing a crappy Java look and feel

So I really feel dumb.

I know I have seen this before with various applications, so that's why I thought that it was a Gnome-related issue.

However, browsing the source of this particular program I am running, it makes a call to
Code:
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
So, it really is this program. Thank goodness for open source software.

I also apologize for my idiocy.
Strife is offline   Reply With Quote
Old July 12th, 2005   #10
maruchan
Quad Shot of Ubuntu
 
maruchan's Avatar
 
Join Date: Mar 2005
Beans: 407
Re: Gnome forcing a crappy Java look and feel

Apology accepted, Strife!
maruchan is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:47 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry