import java.awt.*; public class Menu1 extends GuiApp { public Menu1(String title) { super(title); // 1. Create the menu bar MenuBar mb = new MenuBar(); // 2. Create the menus Menu fm = new Menu("File"); // 3. Add items to the menus fm.add("New"); fm.add("Exit"); // 4. Hook everything together mb.add(fm); setMenuBar(mb); } public static void main(String[] args) { Menu1 app = new Menu1("A Simple Menu"); app.show(); } }