To make your form work, you have to provide a runtime frame for it. The main() method for GUI forms takes care of creation and disposal of such frame.
- Open for editing the bound class of a form where you want to create the main() method.
- Press ⌘N⌃N⌘N^ N⌥ Insert.
- On the pop-up menu, click Form main(). The following method is added to the
source code:
public static void main(String[] args) { rame = new JFrame("<class name>"); tContentPane(new <class name>().contentPane); tDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ck(); tVisible(true);