Nimbus Look And Feel


Good news for all the user, using JDK6. Though I am little late in
writing blog on this but its OK ;). JDK6 current update comes with a
new L&F(Look And Feel) called Nimbus.

Nimbus provide more lively look and feel in Swing UI. Here are some examples:


Default Look And Feel(Click to see enlarged mode)
Nimbus Look And Feel((Click to see enlarged mode)


Since
the image is little small and related to my Online Java Project(which I
can't change), so I provide another example here from my last blog code.

Default Look And Feel
Nimbus Look And Feel

Something
more interesting is focus traversal on components. For Default L&F,
you can see that there is a dotted rectangle on Button 3, which says
"Focus is here" whereas in Nimbus you can see Button 1 with little
bluish highlight which says "Look at my focus" :)

Quickest way to try, command line:

Run my previous (or any UI code) with the following option:

java -Dswing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel LayoutCheck

Off course, you can do it with code :

UIManager.setLookAndFeel(
"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
Use try, catch and respect Exception handling as well.

Comments:

It looks very nice.

But it is a shame that under Linux in combination with IntelliJ IDEA it doesn't work. Popup menu's are not shown for example.

But it certainly looks very promising.

Posted by Peter Veentjer on May 14, 2008 at 09:16 AM IST #

Ah thanks ! I will write for pop-up menu as well :) Ya under linux there are some problem, we are handling it and soon it will work.

Posted by Vaibhav Choudhary on May 14, 2008 at 10:27 AM IST #

how does nimbus look and feel take effect to the entire GUI?

When i load nimbus look and feel.. there are limited GUI's that are provided for this look and feel. some look 'n feel affects only in JOptionPane and other internal GUI's. But regarding the Buttons, JList, JTextAreas are not performing the latest Look 'n Feel. Maybe there is argument to be called.. or maybe you need to agitate these GUI's in order to take effect the new look 'n feel. is that so?

Posted by Jimuel on January 14, 2009 at 12:32 PM IST #

this is cool, but my friend is also using this.so, i wanna use something else will you let me know how to add new look and feel like tinylaf,synthetica...... in jdk1.6.
thanks.

Posted by jackhunter on October 16, 2010 at 11:54 AM IST #

Post a Comment:
Comments are closed for this entry.
About

Hi, I am Vaibhav Choudhary working in Sun. This blog is all about simple concept of Java and JavaFX.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today