@@ -0,0 +1,975 @@
+import java.awt.*;%0A%0Aimport java.awt.event.*;%0A%0Aclass MenuItemAction extends Frame implements ActionListener%0A%0A%7B%0A%0AMenuBar mb;%0A%0AMenu m;%0A%0AMenuItem exit;%0A%0A%0A%0A    public MenuItemAction()%0A%0A    %7B%0A%0A        createAndShowGUI();%0A%0A    %7D%0A%0A    %0A%0A    private void createAndShowGUI()%0A%0A    %7B%0A%0A        setTitle(%22ActionListener for MenuItem%22);%0A%0A       %0A%0A        // Create MenuBar, Menu, MenuItem%0A%0A        mb=new MenuBar();%0A%0A        m=new Menu(%22Menu%22);%0A%0A        exit=new MenuItem(%22Exit%22);%0A%0A       %0A%0A        // Add ActionListener%0A%0A        exit.addActionListener(this);%0A%0A       %0A%0A        // Add exit to menu and menu to menubar%0A%0A        m.add(exit);%0A%0A        mb.add(m);%0A%0A       %0A%0A        // Set menu bar to frame%0A%0A        setMenuBar(mb);%0A%0A       %0A%0A        setSize(400,400);%0A%0A        setVisible(true);%0A%0A    %7D%0A%0A    %0A%0A    public void actionPerformed(ActionEvent ae)%0A%0A    %7B%0A%0A        System.exit(0);%0A%0A    %7D%0A%0A    %0A%0A    public static void main(String args%5B%5D)%0A%0A    %7B%0A%0A        new MenuItemAction();%0A%0A    %7D%0A%0A%7D%0A

Create MenuItemAction.java