Is there a way to specify a global look and feel for swing apps?

Solution 1:

The menus are dark and gray because of a Java bug. You can find it on Ubuntu's bug tracker. In the meantime, if you want to integrate Netbeans in the global menu, there's a way to do that. Here's how it looks like: http://www.youtube.com/watch?v=E8d9szgPhs8

The steps, obtained from this blog post are as follows.

  1. First install openjdk-7-jdk. It's required, so if you use 6, be careful.
  2. To make Netbeans use openjdk-7-jdk, launch Netbeans with

    /opt/netbeans-7.1.2/bin/netbeans --jdkhome /usr/lib/jvm/java-7-openjdk-i386

    You can make a .desktop file in ~/.local/share/applications with that as the exec command, for conveience. Copy the default one and edit it.

  3. Install and use the Java Swing Ayatana plugin from this googlecode page.
  4. Restart Netbeans.