I am using Eclipse, but this only depends what you like. Using Eclipse you can define the used Formatter for your
Java Code Style (I guess that you also can do this in netbeans). Eclipse already offers an "Java Conventions [build-in]" that should be very close to Sun Conventions. Of course you can modify it or do whatever you like.
Actually I don't like Sun Convention too much, so that I am using my style during programming. Afterwards I am thinking about using an beautifier (via my
ant buildscript), so that sun gets what it wants.
Hope that helped a little bit.