Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Look & Feel

Posted on 2004-10-27
4
Medium Priority
?
344 Views
Last Modified: 2007-12-19
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
Comment
Question by:lomidien
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 2

Expert Comment

by:Breadstick
ID: 12429036
> 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
 

Author Comment

by:lomidien
ID: 12429120
How do I set it so that it is JGoodies as opposed to the standard L&F for the OS?
0
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 12429147
use the class name of the JGoodies L&F.
0
 
LVL 92

Expert Comment

by:objects
ID: 12429206
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question