Embed Nimbus's look and feel to your Java programs using Netbeans

This one gave me a little headache, cause it shouldn't really be an issue, but it turned out to be a non trivial tweak.

What's the story?
I use Netbeans 6.5 and Java 1.6.0_11 and I wanted my gui programs to "wear" the nimbus look and feel.

How should I configure my netbeans gui builder to dress my program with the nimbus l&f?

First thing I needed to configure my current project to use the latest JDK, it used as a default a previous version (1.6.0_07) which doesn't support the nimbus l&f.

First thing was to add the latest jdk to the netbeans platform, go to Tools --> java platform and add the new jdk.

The next task is to add the new jdk to the specific project; project properties --> Libraries and under the Java platform pick the new JDK to run this program. 

Now that the JDK issue is set, it's time to set the actual L&F: 
Project properties --> Application --> Desktop app --> Look & Feel -->
com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel


That's it, compile and run your beatiful program, and pay special attention to those beautiful buttons, scroll bars and tabs.

Comments

Unknown said…
thats it :)
it works now
Anonymous said…
Your post is useful for me. Thank a lots !
Anonymous said…
Hello Sir,

I am using Netbeans 6.9, I cannot find the option Desktop app-> Look & Feel

I was able to change the L&F of the Netbeans itself by modifying netbeans.conf. However, the programs I have created still runs in metal L&F. Hope you can help me.

Rey
Anonymous said…
Thanks your post was useful..But I have one question.. I have set up the Nimbus look and feel. When I run the created application the Nimbus L&F is not set for the first screen(JFrame) , but it is applying to other screens when I logged into the application. Thanks.

Popular posts from this blog

Profiling Java @ 2019

Shared/Pro/Managed Hosting for your site - which to choose ? (NO AFFILIATE LINKS!)

ZVR converter