Look & Feel

Posted on 2004-10-27
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 =
        ? Options.getCrossPlatformLookAndFeelClassName()
        : Options.getSystemLookAndFeelClassName();
        try {
        catch(Exception e){
            System.err.println("Can't set look & feel:" + e);

Question by:lomidien
    LVL 2

    Expert Comment

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

    Author Comment

    How do I set it so that it is JGoodies as opposed to the standard L&F for the OS?
    LVL 92

    Accepted Solution

    use the class name of the JGoodies L&F.
    LVL 92

    Expert Comment

          UIManager.setLookAndFeel(new Plastic3DLookAndFeel());

    Or use one of the following class names:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Cisco Complete Network Certification Training

    If you’re an IT engineer or technician, it's time you take your career to the next level. This elite training bundle is brimming with all of the information you need to learn to sit for Cisco CNNA, CCNP, and CCENT certification exams.

    An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
    Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
    Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

    846 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now