How do I make use of the GUI desginer generated code?

I'm trying out the swing GUI designer, and eventually figured out that I can make the designer add the code instead of using a binary file, but if I'm not supposed to edit the generated method, or call it from my code, what use is the GUI designer?

Am I just supposed to use the generated code as an example?

Or copy paste it elsewhere?

The whole thing seems kinda pointless if I'm not supposed to use the code it generates, which can't be right...

No amount of searching through the help files or on Google gave me a useful answer.

2 comments

Ok, I figured it out (I think).

You use Alt+Ins. to generate (as of IDEA 9.0.1) "Form main()" in the bound class.

0

Hello Trampas,

The generated code creates the components for you, and is called automatically
from the class initializer of the form class. You're not supposed to edit
it, but you can write your own code that manipulates the components created
by the generated code.

I'm trying out the swing GUI designer, and eventually figured out that
I can make the designer add the code instead of using a binary file,
but if I'm not supposed to edit the generated method, or call it from
my code, what use is the GUI designer?

Am I just supposed to use the generated code as an example?

Or copy paste it elsewhere?

The whole thing seems kinda pointless if I'm not supposed to use the
code it generates, which can't be right...

No amount of searching through the help files or on Google gave me a
useful answer.

---
Original message URL:
http://www.jetbrains.net/devnet/message/5259745#5259745

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.