I'm currently (trying) to setup a dev environment in Linux (Ubuntu) and have opted to use Netbeans PHP as my IDE.

The main toolbar at the top is too dark to read the menu item text (unless I click to bring up the dropdown, which won't really do). Is there any way I can fix this? Do I have to use a different Ubuntu theme, or can Netbeans be changed?

enter image description here



3 Answers 3


Its an old question I know.

I had a similar problem as well. + ftp problems. Using an ugly laf wasn't the answer I was looking for.

I'm using openjdk-7-jre now to run Netbeans. It fixed the problem with the dark menu as well as a problem with brocken ftp-connections from netbeans.

Using: Netbeans 7.3 in Ubuntu 12.04

  • This is the correct answer. I was also having freezing issues with Netbeans 7.3 and Ubuntu 13. Using openjdk-7-jre fixed all of my problems. Jul 25, 2013 at 16:09

There are number of bug reports on the issue you're experiencing. You can however change the look and feel. As of writing, the following are available:

  • Windows - com.sun.java.swing.plaf.windows.WindowsLookAndFeel
  • Metal - javax.swing.plaf.metal.MetalLookAndFeel
  • GTK - com.sun.java.swing.plaf.gtk.GTKLookAndFeel
  • Nimbus - com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
  • Aqua - apple.laf.AquaLookAndFeel

* <laf_name> - <laf_class>

Changing the Look and Feel

Use the --laf <laf_class|laf_name> start-up option.

  1. Edit the configuration file:

    sudo vi /usr/local/netbeans-{VERSION}/etc/netbeans.conf

  2. Add custom look and feel by adding the --laf <laf_class|laf_name> option to the netbeans_default_options variable.

e.g. If you want Nimbus:

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m 
    -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true
    -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true 
    --laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"

or by name e.g. if you want Metal:

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m 
    -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true 
    --laf Metal"

Test Look and Feel & other options by running from Terminal

Running from the terminal is easy:

$ /usr/local/netbeans-{VERSION}/bin/netbeans

Run with Metal look and feel:

$ /usr/local/netbeans-{VERSION}/bin/netbeans --laf Metal

Run with GTK look and feel:

$ /usr/local/netbeans-{VERSION}/bin/netbeans --laf GTK

Extra Credit

Run from terminal in background job; append &

$ /usr/local/netbeans-{VERSION}/bin/netbeans --laf Metal &

Create a symlink to bypass specifying the path:

$ ln -s /usr/local/netbeans-{VERSION}/bin/netbeans ~/bin/netbeans
# now you can run without specifying the path
$ netbeans
# run in background job
$ netbeans &
# run with Metal laf in background job
$ netbeans --laf Metal &


  • any way to load external theme ?
    – Francesco
    Sep 26, 2012 at 16:23
  • Well, the look-and-feel option, --laf, accepts either a class or an alias: --laf <laf_class|laf_name>. My best guess would be that: if you use the class name and that class is available to netbeans, it will be loaded. No? How to ensure the class is available to netbeans? That I don't know. Sep 27, 2012 at 2:51
  • thank you. I also ignore how to make an external class available to netbeans ... ... maybe addind something like this to the config should solve (this is for javahl library ... ): -J-Djava.library.path=/usr/lib/i386-linux-gnu/jni
    – Francesco
    Sep 27, 2012 at 8:16

Following the instructions on this page fixed my problem in the end.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.