Section 12.2 Java’s Nimbus Look-and-Feel

• As of Java SE 6 update 10, Java comes bundled with a new, elegant, cross-platform look-and-feel known as Nimbus (p. 476).

• To set Nimbus as the default for all Java applications, create a swing.properties text file in the lib folder of your JDK and JRE installation folders. Place the following line of code in the file:

swing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel

• To select Nimbus on an application-by-application basis, place the following command-line argument after the java command and before the application’s name when you run the application:

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

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.