The following lines are part of the code which tries to make a Menubar with Menu items. Sort them in a proper order.
JMenu
Sort the Code
Report a typo
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"));
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.