Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , , ,

Sponsored Links


How to use Nimbus Look and Feel in Java?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 14-02-2010
super soaker's Avatar
Member
 
Join Date: Aug 2006
Posts: 209
How to use Nimbus Look and Feel in Java?

Sponsored Links
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.!!!

__________________
Blessings to you

Last edited by super soaker : 14-02-2010 at 12:22 AM.
Reply With Quote
  #2  
Old 14-02-2010
Member
 
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.!!
Reply With Quote
  #3  
Old 14-02-2010
Member
 
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?
Reply With Quote
  #4  
Old 14-02-2010
MELTRONICS's Avatar
Member
 
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
Reply With Quote
  #5  
Old 14-02-2010
Allan.d's Avatar
Member
 
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) {

}
Reply With Quote
  #6  
Old 14-02-2010
kyosang's Avatar
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to use Nimbus Look and Feel in Java?"
Thread Thread Starter Forum Replies Last Post
Which is the game that made you feel the need of ps3? Indukala Video Games 6 14-07-2011 09:00 PM
How do you feel about the FUP Lhamu Technology & Internet 3 08-02-2011 06:43 PM
Look and feel in JAVA Karumbu Software Development 4 24-12-2010 07:48 AM
How to change the Look and Feel in Java? Bigga Lexx Software Development 5 13-02-2010 11:55 PM
Nimbus Multi-messenger for sony ericsson X-Man Portable Devices 3 28-03-2009 03:27 PM


All times are GMT +5.5. The time now is 11:05 AM.