IntelliJ IDEA GUI builder – no Java code generated
Asked Answered
H

1

13

I have designed my GUI form in the IntelliJ IDEA GUI designer, and selected the radio button in Project Settings → GUI Designer to generate source code instead of .class files, but my .java file with code looks like this:

public class PovRayEmptyProjectWizardPanelVisual {
    private JTextField textField1;
    private JTextField textField2;
    private JTextField textField3;
    private JButton button1;
}

That’s it – no code creating the GUI was generated. How do I manually trigger such code generation, so that I can compile the resulting .java file with Maven?

Honshu answered 7/5, 2012 at 13:3 Comment(2)
Are you sure the GUI form is bound to this class and the fields are mapped to the components in the form? Note that you need to Build | Make so that the code is generated into the source file, it will be in the folded section.Sisyphus
Yes, it seems like all i had to do is to run "Make project" inside of Idea, after this it generated missing source code alright. I never did any building in idea before - i was performing all compilation straightly with maven. Please, create an answer, so i could accept it. Also, please, include this url or technique described there to your answer, it might be helpful for someone who want to perform .java code generation from idea .form format with maven solely: glxn.net/?p=279Honshu
S
15

Source code is generated on Build | Make. If you build externally, IDEA GUI forms can be compiled from Ant (javac2 task provided with IDEA) or Maven.

Sisyphus answered 7/5, 2012 at 14:8 Comment(1)
Thanks! and if maven build fails, this might help: #4548015Braca

© 2022 - 2024 — McMap. All rights reserved.