Components
Components¶
initComponents() Method¶
Once we want to initialize the components, we will use the private initComponents() method to initialize the components.
Menu Bar¶
When creating a Menu Bar using the MenuBar class, we can add JMenu and JMenuItem components to the JMenuBar. To initialize these components, we use the private initComponents() method. Also add action listener to the JMenuItem.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |