Monday, December 21, 2009

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 ascom.sun.java.swing.plaf.windows.WindowsLookAndFeel (MS Windows), or com.sun.java.swing.plaf.gtk.GTKLookAndFeel (Linux), orcom.sun.java.swing.plaf.mac.MacLookAndFeel (Mac OS) depending on the operating system you use (See alsoUIManager.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 ( more...), NapkinSyntheticaTinyLaFJGoodies 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.

Original link: http://wiki.netbeans.org/FaqCustomLaf

No comments:

Post a Comment