Generate and view /edit Swing GUI source code in UI Designer

I just decided to switch to IntelliJ Idea from oracle JDeveloper, because JDeveloper had a
tendency  to run out of memory with larger Java programs and crash my computer.  IntelliJ idea has a better reputation, used by large companies.

I actually purchased a personal license for IntelliJ Idea.just very recently.

I  was going to do my first from-scratch GUI application with intelliJ  Idea UI Designer,  and to my shock, as default the form is not saved  into Java code, it is saved into some XML file.
Upon compiling the program will create the appropriate byte code from the XML file.
So the Swing GUI Java format code is essentially hidden from the user / not used in creating the class file.

I  have no doubt about that it works, but I want to see a regular Swing  code listing to the form, that is viewable / editable, to have full  control of the structure of my program, including GUI. I am quite used  to Swing code, I don't need to be 'rescued' from it.

Luckily I found a note in the documentation:
"There is also an option to generate Java source code instead of using the byte-code instrumentation approach. "

I just cannot find HOW this can be done.

Can you help me with how to switch to Java code instead of XML-based form files?

Does it limit the functionality of Idea in any way, that I don't want to use the XML-based form?

Thank you for your help.

3 comments
Comment actions Permalink

Settings -> GUI Designer -> "Generate GUI into:" check "Java source code"

0
Comment actions Permalink

Thank you for your help.

0
Comment actions Permalink

Be awre that the code emitter for the default combo box model is broken when you use jdk 7 and generate java source from GUI layouts (at least for me). It works fine with jdk 6 though and also with the binary .class creator.

More details are here:

http://devnet.jetbrains.net/message/5456800#5456800

and

http://youtrack.jetbrains.com/issue/IDEA-83839

I would be interested if you see the same thing.

Ian

0

Please sign in to leave a comment.