Luiz Renuncio wrote:I am very impressed with the flexibility of Swing Designer. However, how do I accomplish this targeted code generation? Where do I inform the code generator that it should use , for instance, initGUI() as target?
Designer will use whatever template you want to throw at it. To generate code into initGUI(), create a new JFrame, select all of the code after the super() line in the constructor, and use the Extract Method refactoring to move that code to an initGUI() method. Switch to the design view and start adding widgets. They will be placed in the initGUI() method. You can also use the resulting code as a template for any new windows that you create. Note that you can liberally refactor the code at any point, and Designer should still be able to deal with it.