The version of NetBeans that I use is 6.5.1
There is a platform specific property that you may use make your code cross platform. See http://java.sun.com/docs/books/tutorial/deployment/applet/properties.html
String newline = System.getProperty("line.separator");