private JMenuBar makeMenus() {

      ActionListener listener = new ActionListener() {
            // An object that will serve as listener for menu items.
         public void actionPerformed(ActionEvent evt) {
               // This will be called when the user makes a selection
               // from the File menu.  This routine just checks 
               // which command was selected and calls another 
               // routine to carry out the command.
            String cmd = evt.getActionCommand();
            if (cmd.equals("New"))
               doNew();
            else if (cmd.equals("Open..."))
               doOpen();
            else if (cmd.equals("Save..."))
               doSave();
            else if (cmd.equals("Quit"))
               doQuit();
         }
      };

      JMenu fileMenu = new JMenu("File");

      JMenuItem newCmd = new JMenuItem("New");
      newCmd.addActionListener(listener);
      fileMenu.add(newCmd);
      
      JMenuItem openCmd = new JMenuItem("Open...");
      openCmd.addActionListener(listener);
      fileMenu.add(openCmd);
      
      JMenuItem saveCmd = new JMenuItem("Save...");
      saveCmd.addActionListener(listener);
      fileMenu.add(saveCmd);
      
      fileMenu.addSeparator();
      
      JMenuItem quitCmd = new JMenuItem("Quit");
      quitCmd.addActionListener(listener);
      fileMenu.add(quitCmd);

      JMenuBar bar = new JMenuBar();
      bar.add(fileMenu);
      return bar;

   } // end makeMenus()