super ("MenuTest");
MenuItem mi;
Menu file = new Menu ("File", true);
file.add (new MyMenuItem ("Open", this));
mi = file.add (new MyMenuItem ("Close", this));
mi.setEnabled(false);
Menu extras = new Menu ("Extras", false);
mi = extras.add (new CheckboxMenuItem ("What"));
mi.addActionListener(this);
mi = extras.add (new MyMenuItem ("Yo", this));
mi.setActionCommand ("Yo1");
mi = extras.add (new MyMenuItem ("Yo", this));
mi.setActionCommand ("Yo2");
file.add (extras);
file.addSeparator();
file.add (new MyMenuItem ("Quit", this));
Menu help = new Menu("Help");
help.add (new MyMenuItem ("About", this));
MenuBar mb = new MenuBar();
mb.add (help);
mb.add (file);
mb.setHelpMenu (help);
setMenuBar (mb);
setSize (200, 200);
enableEvents (AWTEvent.WINDOW_EVENT_MASK);