My Code:
JMenuBar bar = new JMenuBar();
JMenu menu = new JMenu("Edit circle");
JMenuItem help = new JMenuItem("Help");
JMenuItem exit = new JMenuItem("Exit");
bar.add(menu);
bar.add(help);
bar.add(exit);
Output of the JMenuBar
:
I want the output to be something like this:
What do I need to do in order to get the expected output?