Results 1 to 6 of 6

Thread: How to use Nimbus Look and Feel in Java?

  1. #1
    Join Date
    Aug 2006
    Posts
    209

    How to use Nimbus Look and Feel in Java?

    hi friends,
    I have done many things in Java (only basics). I have never heard about the Look and Feel of Nimbus.!! I have been told to change the look and feel to nimbus. Really speaking, I have never heard about the Nimbus look and feel. So guys, please tell me how to use Nimbus Look and Feel? Any more information related to the same topic would be grateful.!!!
    Last edited by super soaker; 14-02-2010 at 01:22 AM.
    Blessings to you

  2. #2
    Join Date
    Nov 2008
    Posts
    996

    Re: How to use Nimbus Look and Feel in Java?

    Have you heard about the looks and feels about the application in Java..?? I think that you must know more about that first, then you can check with the Nimbus looks and feels. The architecture of Swing is designed so that you may change the "look and feel" of your application's GUI. You can also set the Look and Feel programatically. Also the looks and feels can be specified by Command Line or the swing.properties File. Hope that you got some good points from this.!!

  3. #3
    Join Date
    Nov 2008
    Posts
    1,192

    Re: How to use Nimbus Look and Feel in Java?

    You can also change the look and feel after startup, for which you would have to use the setLookAndFeel. In simple words, you can change the looks and feels with setLookAndFeel even after the program's GUI is visible. You will have to invoke the SwingUtilities updateComponentTreeUI method once per top-level container for making existing components reflect the new looks and feels. You can check the following example :
    Code:
    UIManager.setLookAndFeel(lnfName);
    SwingUtilities.updateComponentTreeUI(frame);
    frame.pack();
    For more reference, have a look at How to change the Look and Feel in Java?

  4. #4
    Join Date
    Aug 2006
    Posts
    235

    Re: How to use Nimbus Look and Feel in Java?

    I think that you should know about the look and feels in Java which is used for the applications. The good thing about the Nimbus is that, you can use the Nimbus look and feel as is, or you can customize, by giving look of your own brand. That's why the Nimbus is highly customizable. Also I would like to alert you with the following thing which happened in my case, so you must be aware of that. "Do not set the Nimbus look and feel explicitly by invoking the UIManager.setLookAndFeel method because not all versions or implementations of Java SE 6 support Nimbus".
    3.2 (northwood)
    2gig ram
    ATI AIW X800xt 256mb
    Gigabyte GA-8knxp 875p Chipset
    Optiwrite 8X DVD Burner
    Win XP PRO Sp2 (Works Perfectly)
    2 SATA Raptor 74gig Raid 0
    2 7200 IDE 320gig HD

  5. #5
    Join Date
    Mar 2008
    Posts
    672

    Re: How to use Nimbus Look and Feel in Java?

    When you don't change the setting of the look and feel, Metal will be the default Swing look and feel. If you want it in Nimbus look and feel, then you will have to put some coding for that. I am giving the code that you would have to add to the event-dispatching thread before creating the graphical user interface :
    Code:
    import javax.swing.UIManager.*;
    
    try {
        for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
            if ("Nimbus".equals(info.getName())) {
                UIManager.setLookAndFeel(info.getClassName());
                break;
            }
        }
    } catch (Exception e) {
    
    }

  6. #6
    Join Date
    Jul 2006
    Posts
    442

    Re: How to use Nimbus Look and Feel in Java?

    If you want to set the default look and feel to Nimbus permanently, you can do this by adding following line to the <JAVA_HOME>/lib/swing.properties file. If the swing.properties file is not existing, then you will have to create it before using the following line :
    Code:
    swing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel
    "When they give you ruled paper, write the other way..." J.R.J.

Similar Threads

  1. I feel I don’t require iCloud
    By Chung Ae in forum Networking & Security
    Replies: 4
    Last Post: 17-10-2011, 04:23 AM
  2. How do you feel about the FUP
    By Lhamu in forum Technology & Internet
    Replies: 3
    Last Post: 08-02-2011, 07:43 PM
  3. Look and feel in JAVA
    By Karumbu in forum Software Development
    Replies: 4
    Last Post: 24-12-2010, 08:48 AM
  4. How to change the Look and Feel in Java?
    By Bigga Lexx in forum Software Development
    Replies: 5
    Last Post: 14-02-2010, 12:55 AM
  5. Nimbus Multi-messenger for sony ericsson
    By X-Man in forum Portable Devices
    Replies: 3
    Last Post: 28-03-2009, 03:27 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,708,058.74936 seconds with 17 queries