Organization of the codes generated by WindowBuilder

1

I'm using WindowBuilder to draw the graphical interface, but there's one thing that's kind of boring in it, which is as follows. When I create a JLabel for example, it declares the JLabel inside the constructor, making me unable to use it directly in other methods. Is there any way that automatically everything I create goes directly to the class, gets organized at the top, so I do not have to do this manually with all the components I have to handle in more than one class?

    
asked by anonymous 23.07.2014 / 09:45

1 answer

1

I found the solution, if anyone prefers to have the components declared from the constructor, you can do the following configuration:

In the eclipse go to the WINDOW > PREFERENCES > WINDOWBUILDER > SWING > CODE GENERATION and in the little window that says: variable generation, just select Field , and then press ok.

    
23.07.2014 / 10:00