In IntelliJ
form is designed in special editor and saved in two files: *.java
file and *.form
file.
Here is the entire code of the application:
import javax.swing.*;
public class Test02 {
private JButton button1Button;
private JButton button2Button;
private JButton button3Button;
private JPanel mainPanel;
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setContentPane(new Test02().mainPanel);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
}
If I run it, the following Window appear:
I.e. buttons got names and locations inside layout manager, according to data int *.form
file.
How can it be?
No any initialization code, no any coordinates, no any reference to form
file.
Where is *.form
file read?