(This post was originally written circa Dec. 2007)
Netbeans 6.0 is out, it looks really good, some of the code editor improvements are brilliant (actually I really like the color scheme : ) ). Thats besides the point, there is a major problem that I have with using Netbeans 6.0 on Mac OS X 10.5. The problem is that the menu-bar is just endless and as a result covers most of my stat-counters etc. So, how does one fix it, simple switch to the metal LAF. Some of us, me actually, like the blueish Java metal LAF. So to do this just run netbeans with a few command line parameters, like so,
/Applications/NetBeans/NetBeans\ 6.0.app/Contents/MacOS/netbeans --laf
javax.swing.plaf.metal.MetalLookAndFeel --fontsize 12
This, launches Netbeans 6.0 (provided you have chosen the default installation location) with the metal look and feel, and a font size of 12 (the default is 11). As can be seen in the screenshot, a new dock icon is launched however and I haven't figured out how to link the Netbeans.app one and the one that launches from the using the binary file.
In general, to use the Metal look and feel with your Java applications on Mac OS X, simply launch them with the following command line parameter
-Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel
for example,
java -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel -jar
/Developer/Examples/Java/JFC/SwingSet2/SwingSet2.jar
launches the swing set example, with the metal look and feel. This of-course cannot be used with the /jdkhome/bin commands, jconsole for example. To change your default settings that is to have applications launch with the Metal LAF by default, you need to edit the swing.properties file.
17864397:~ anujseth$ cd /Library/Java/Home/lib
17864397:lib anujseth$ sudo vi swing.properties
The default is set to Apple's Aqua LAF and can be changed accordingly, for example,
#the java metal LAF
swing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel
#apple default setting
#swing.defaultlaf=apple.laf.AquaLookAndFeel
this is what my swing.properties file looks like.
Thats about it, I wrote this because I could not really find any such document on the Metal LAF, ah well maybe I'm the only crazy one who prefers it to all native-ish LAF's. Dare I say, Happy Hacking!, :).