Last week, when I was at the IPC 2009 conference, a some user ask me whether NetBeans removes trailing spaces. It was one question from many and I would like to clarify how it works in NetBeans 6.0 - NetBeans 6.8.
Basically it works automatically on save. So when you invoke Save action then the trailing spaces should be removed from the file. There are two exceptions, when the spaces are not removed from a line:
If you want remove all trailing spaces in the file, you have to invoke action Remove Trailing Spaces from Source menu by hand.