Over a million developers have joined DZone.

Swing Looks ...Great (Part III Nimbus)

· Java Zone

Discover how AppDynamics steps in to upgrade your performance game and prevent your enterprise from these top 10 Java performance problems, brought to you in partnership with AppDynamics.

Nimbus comes already with JDK 1.6.

Nimbus doesn't have to be installed, it is shipped with JDK 1.6. You only have to activate it. There is a hacky (because of reflection) but robust way to activate that. This complex approach is needed, because Nimbus was introduced with JDK 1.6u10 and was not available before.

try {
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
} catch (UnsupportedLookAndFeelException e) {
// handle exception
} catch (ClassNotFoundException e) {
// handle exception
} catch (InstantiationException e) {
// handle exception
} catch (IllegalAccessException e) {
// handle exception

[Code Snippet from:http://download.oracle.com/javase/6/docs/technotes/guides/jweb/otherFeatures/nimbus_laf.html]
The command line option -Dswing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel can be used as well.With NetBeans you can create a Nimbus mock-up in minutes (actually seconds).

From http://www.adam-bien.com/roller/abien/entry/swing_looks_great_part_iii

The Java Zone is brought to you in partnership with AppDynamics. AppDynamics helps you gain the fundamentals behind application performance, and implement best practices so you can proactively analyze and act on performance problems as they arise, and more specifically with your Java applications. Start a Free Trial.


The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}