I'm starting to develop small desktop apps in Java using Swing. I use NetBeans as IDE.
One thing I have noticed is that when I create a JFrame, it creates one single file with around 150 lines of code creating the controls contained by the JFrame, the layout and all that stuff. This is different from Visual Studio WinForms, which would have a Designer file with all that autogenerated code and then one almost empty class file in which you would code anything.
Because it feels messy to have your own written code in the same file that the autogenerated code, I would like to have them in separated files. I would have in the JFrame file only the autogenerated code and the event handlers for the controls, and those event handlers would call functions from a Java class designed specifically to handle the behaviour of that JFrame.
Would this be considered a bad practice? Is there some convention on how to implement the "behaviour" of the JFrame separatedly from the designer code?