Sort the Code

Report a typo

The following lines are part of the code which tries to make a Menubar with Menu items. Sort them in a proper order.

Put the items in the correct order
JMenu fileMenu = new JMenu("File"); fileMenu.setMnemonic(KeyEvent.VK_F);
setJMenuBar(menuBar); menuBar.add(fileMenu)
JMenuBar menuBar = new JMenuBar(); fileMenu.add(new JMenuItem("New"));
___

Create a free account to access the full topic