I’m working on a school project using Swing and NetBeans. As a result, I have a lot of automatically generated code in my project. We have to follow strict style guidelines using CheckStyle. Is it possible to have the automatically generated source code formatted a certain way? As an example, is it possible to make the lines not go over 80 characters width?
Share
If you’re allowed to use generated code, the teacher should understand that this code is not generated by you, but by the IDE, and shouldn’t care that it doesn’t respect the formatting rules.
If he doesn’t understand it, then let Netbeans generate the code, and then edit it using any text editor before giving it to the teacher.
If I were your teacher, I wouldn’t allow the use of Netbeans’s wysiwig editor, though. You learn how to use Swing (and use it properly) by hand-crafting the code, not by dragging and dropping Swing components.