Any way to change dark Netbeans IDE theme?

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

Thanks.


Solution 1:

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

Solution 2:

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 
    -J-Dsun.zip.disableMemoryMapping=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.laf.useScreenMenuBar=true
    -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true 
    -J-Dsun.zip.disableMemoryMapping=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 &

Resources

  • How do I make my custom startup parameters permanent?
  • Look and Feels in NetBeans
  • Can I run NetBeans with a custom Look and Feel (laf)?

Solution 3:

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