Whats worng with this code ?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Whats worng with this code ??

class exMenu extends try1 { exMenu (){ setSize (300,300); JMenuBar mB = new JMenuBar (); setJMenuBar (mB); JMenu mFile = new JMenu ("File"); mB.add(mFile); JMenuItem itmNew = new JMenuItem ("New"); JMenuItem itmExit = new JMenuItem ("Exit"); mFile.add(itmNew); mFile.add(itmExit); setVisible (true); public static void main (String [] arts){ new exMenu(); } }

1st Apr 2017, 8:12 AM
Sekar Amalia
Sekar Amalia - avatar
2 Answers
+ 1
you're not closing the "exMenu" function
1st Apr 2017, 8:20 AM
Awal
Awal - avatar
+ 1
how??
3rd Apr 2017, 3:47 AM
Sekar Amalia
Sekar Amalia - avatar