UI designer form broken and does not work anymore
Answered
After some manipulations, I have lost the connection between form file and it's bound class.
The following code
public static void main(String[] args) {
JFrame frame = new JFrame("MyForm");
JPanel mainPanel = new Test03().mainPanel;
frame.setContentPane(mainPanel);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
does not work, having mainPanel null as it should be since it is not initialized.
Resetting "bind to class" didn't help.
Setting GUI Designer / Generate GUI Into = Java source code didn't help. Some code appeared in the class, but inspection says classes like
com.intellij.uiDesigner.core.GridConstraints
are not found. No any way to autofix error and/or import some jars. No any known jar name for uiDesigner known and/or documented.
What to do?
Please sign in to leave a comment.
Add IDEA_HOME\redist\forms_rt.jar to the module dependencies (http://www.jetbrains.com/idea/webhelp/configuring-module-dependencies-and-libraries.html).