Problem with UIManager.setLookAndFeel()

F

Fencer

Hi!

In my program I use UIManager.setLookAndFeel() to set a native look and
feel (using UIManager.getSystemLookAndFeelClassName() as the argument)
and it has been working great...until now.

I exported my app as a runnable jarfile and tried it on my boss'
computer that is running Windows XP and Java 1.6.0_07 and the entire
client area of the GUI is grey. The menus work however and the program
responds to commands.

I tracked it down to my usage of UIManager.setLookAndFeel() as I
described above. Funny thing is that setLookAndFeel() doesn't throw any
exceptions and the classname returned is the same as on my workstation
(that's running Windows Vista and I use Eclipse to develop this
application, my workstation also has Java 1.6.0_13).

On my boss' computer, an older version of the program is available as an
eclipse project and that version does the same setLookAndFeel()-stuff
and that works just fine.

I'm wondering what to do now because we want to have a native look and
feel for this program.

I think I will try to run the latest version of the program from within
eclipse on my boss' computer and see what happens. I didn't want to
upgrade the Java version right away until I have done some more tests.

I was just wondering if anyone has seen this behavior and isn't odd that
setLookAndFeel() didn't throw any exceptions even though the entire
client area turns into a blank gray rectangle?

As a work-around for now I've introduced a command line argument that
disables the attempt to set a native look and feel.

- Fencer
 
Joined
Nov 17, 2010
Messages
1
Reaction score
0
I am getting the same problem.We have migrated Swing application from java 1.4 to java 1.6.All the buttons after migration are greyed out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top