create java code for form made in designer

Answered

Hello everyone,

I designed a form in the form designer of IntelliJ idea. I would like the java code to build that form to be automatically generated. How do I do that? Is that even possible? I have made sure that the setting 'generate GUI into' is set to Java source code.

Thanks in advance,

Rob

0
3 comments

Use Build and the code will appear in the .java file (it will be folded/collapsed by default).

0
Avatar
Permanently deleted user

I cant build the form, it won't allow me to build anything but the java files in the project. It did create a java file for the form, but that only has the following code:

import javax.swing.*;

/**
* Created by User on 11-May-17.
*/
public class RecordForm {
private JScrollPane recordScroller;
private JList recordList;
private JPanel formPanel;
private JPanel panelA;
private JRadioButton rbArtistA;
private JPanel panelArtistA;
private JTextField fNameA;
private JTextField lNameA;
private JRadioButton rbBandA;
private JPanel panelBandA;
private JTextField bNameA;
private JTextField titleA;
private JPanel panelMisc;
private JTextField recordLabel;
private JTextField catNo;
private JTextField condition;
private JPanel buttonPanel;
private JButton addRecord;
private JButton clear;
private JPanel panelBOuter;
private JRadioButton same;
private JPanel panelBInner;
private JRadioButton rbArtistB;
private JPanel panelArtistB;
private JTextField fNameB;
private JTextField lNameB;
private JRadioButton rbBandB;
private JPanel panelBandB;
private JTextField bNameB;
private JTextField titleB;
}
0

Bind the Java file to the form, the code will be generated into this file.

If the issue remains, please provide a sample project illustrating the problem and the exact steps to reproduce.

0

Please sign in to leave a comment.