Results 1 to 5 of 5

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

  1. #1

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

    Hi again 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?

  2. #2
    Join Date
    Jun 2008
    Location
    New Zealand
    Posts
    78

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

    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
    BZFlag: good clean fun. Sorta.

  3. #3

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

    Quote Originally Posted by GransRemedy View Post
    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

  4. #4
    Join Date
    Jun 2008
    Location
    New Zealand
    Posts
    78

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

    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.
    BZFlag: good clean fun. Sorta.

  5. #5

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

    Quote Originally Posted by GransRemedy View Post
    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

Posting Permissions

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