This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I agree with Fred. I would suggest you try Notepad2, Notepad++ and jEdit as editors. Set up their automatic indentation, bracket and syntax highlighting, and automatic conversion of tab to 4 spaces options, and that will make well-formatted code easier to achieve.