FaqCustomLaf

Can I run NetBeans with a custom Look and Feel (laf)?

Yes. You can switch the look and feel (laf) of NetBeans to any of the following widgets: (Screenshots)

Available Themes

  • Metal: Also known as "Cross Platform Look And Feel" or "Ocean theme". The typical Java look - this is the default. This class is part of the Java Runtime as javax.swing.plaf.metal.MetalLookAndFeel.
  • Nimbus: A modern Synth-based laf. This class is part of the Java Runtime 6u10 as com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel.
  • Native: Also known as "System Look And Feel". These classes are part of the Java Runtime as com.sun.java.swing.plaf.windows.WindowsLookAndFeel (MS Windows), or com.sun.java.swing.plaf.gtk.GTKLookAndFeel (Linux), or com.sun.java.swing.plaf.mac.MacLookAndFeel (Mac OS) depending on the operating system you use (See also UIManager.getSystemLookAndFeelClassName()).
  • Motif: A classic laf. This class is part of the Java Runtime as com.sun.java.swing.plaf.motif.MotifLookAndFeel.
  • ... or choose a third-party laf such as Substance, Napkin, Synthetica, TinyLaF, JGoodies Plastic, and many more. Note that NetBeans is not being regularly tested with alternate/third-party look and feel implementations. Various implementations may or may not work well.

Activating a Theme

Follow these steps to try out different lafs:

  1. Decide which Look and Feel widget you want (see list above) and remember it's class name (<laf_class>).
  2. If it's a third-party widget, download the JAR file containing the custom laf classes (<jar_path>).
  3. Start NetBeans from the command line with the following options (cf. examples below):
    1. If it's a third-party widget, place the JAR in the classpath using the --cp:p <jar_path> start-up option.
    2. Select the laf using the --laf <laf_class> start-up option.
  4. When NetBeans starts you should notice the different look. If not, check for typos.
  5. If you like the theme, make your custom start-up parameters permanent.



Examples

Running NetBeans on Windows with the third-party JGoodies Plastic XP look and feel

netbeans.exe --cp:p C:\looks-1.2.2.jar --laf com.jgoodies.plaf.plastic.PlasticXPLookAndFeel

Running NetBeans on Windows with the third-party winlaf look and feel

netbeans.exe --cp:p C:\winlaf-0.5.1.jar --laf net.java.plaf.windows.WindowsLookAndFeel

Setting NetBeans to permanently use the Metal look and feel on Mac OS X

Ctrl-click the /Applications/NetBeans/NetBeans\ IDE\ 6.5.app file in the Finder and select "open package contents". Edit the following file:

/Applications/NetBeans/NetBeans\ IDE\ 6.5.app/Contents/Resources/NetBeans/etc/netbeans.conf

so that the line beginning netbeans_default_options includes the following option between the quotation marks:

--laf javax.swing.plaf.metal.MetalLookAndFeel

Setting NetBeans to permanently use the GTK Look and Feel on a GNU/Linux system

Edit the following file in your NetBeans installation directory:

{$NB_HOME}/etc/netbeans.conf

so that the line beginning netbeans_default_options includes the following option between the quotation marks:

--laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel

Substance Look and Feel plugin

Installing and configuring the Substance plugin. See also: NetBeans 6.0 supports the Substance Look and Feel

Screenshots

Petr posted some nice screenshots in his blog entry about How to change the Look and Feel of NetBeans.

Adam has some more NBLookAndFeels.


Applies to: NetBeans 4.x, 5.x, 6.x, 7.x

Platforms: All (native L&F implementations may work on specific platforms only).

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo