[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 348
  • Last Modified:

Look & Feel

I'm using JGoodies Look & Feel for my application.  When I run the application under Windows XP and I get a very nice looking GUI.  If I run the same application on a Windows 2000 box, the GUI takes on those features...which is what I do not want.  How do I keep the XP L&F under 2000 with JGoodies?

Here is my code initializing JGoodies:

    public void SetLookFeel(){
        String lafName =
        LookUtils.IS_OS_WINDOWS_XP
        ? Options.getCrossPlatformLookAndFeelClassName()
        : Options.getSystemLookAndFeelClassName();
       
        try {
            UIManager.setLookAndFeel(lafName);
        }
        catch(Exception e){
            System.err.println("Can't set look & feel:" + e);
        }
    }

Thanks,
David
0
lomidien
Asked:
lomidien
  • 2
1 Solution
 
BreadstickCommented:
> String lafName =
> LookUtils.IS_OS_WINDOWS_XP
>        ? Options.getCrossPlatformLookAndFeelClassName()
>        : Options.getSystemLookAndFeelClassName();

So... if your using Windows XP, you'll get the default Java cross platform look and feel.  Otherwise, you'll get your system look and feel.  Where do you set the look and feel to the JGoodies one?
0
 
lomidienAuthor Commented:
How do I set it so that it is JGoodies as opposed to the standard L&F for the OS?
0
 
objectsCommented:
use the class name of the JGoodies L&F.
0
 
objectsCommented:
either:
      UIManager.setLookAndFeel(new Plastic3DLookAndFeel());

Or use one of the following class names:

com.jgoodies.plaf.windows.ExtWindowsLookAndFeel
com.jgoodies.plaf.plastic.PlasticLookAndFeel
com.jgoodies.plaf.plastic.Plastic3DLookAndFeel
com.jgoodies.plaf.plastic.PlasticXPLookAndFeel
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now