- Open for editing the bound class of a form where you want to create the main() method.
- Press Alt+InsertCommand N; Command Enter.
- On the pop-up menu, click Form main(). The following method is added to the
source code:
public static void main(String[] args) { JFrame frame = new JFrame("<class name>"); frame.setContentPane(new <class name>().contentPane); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); }

