[Java] My Swing component's style is changed!

Hi again :wink: It’s appened a strange thing… my swing component’s style on all java application is changed! I had tried to install JRE from sun.com and change options from Java panel but the style it’s always different… example: http://img527.imageshack.us/img527/715/screen1lg1.png

How can I restore the default style of java application? :frowning:

This is normally handled in code by the developer, who if they are nice to end users will let them choose a ‘look and feel’ via a menu, rather than just using the default.
However, you can also try setting if from the command line when starting a Java app, with something like:
java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel MyApp
This doesn’t always work (depends on app) and there is a way of putting this into a file for the JRE to always use.
HTH

The problem is that this style appears in every java application, in my applications too… o_O

Ok, have a look here there is some info from Sun about changing the file which Java apps use to pick the ‘look and feel’ to use.

Thank you very much, now it works well :slight_smile: