I'm using v6.5.1 so i first installed Java 6 (Java for Mac OS X 10.5 Update 4)
Then I changed the Java Applet Runtime Settings. You can get this info here:
http://www.metaphoriclabs.com/articles/installing-java-6-on-mac-os-x/Finally, I made the change in the netbeans_jdkhome variable in netbeans.conf file to version 1.6 instead of 1.5
Took quite a while to figure out all the three things since it isn't all that obvious... Hope it works for you.