public void enableLoadSource() {
   loadButton.setEnabled(true);
   loadSourceMenuItem.setEnabled(true);
 }
  // arranges the menu bar
  protected void arrangeMenu() {
    // Build the first menu.
    fileMenu = new JMenu("File");
    fileMenu.setMnemonic(KeyEvent.VK_F);
    menuBar.add(fileMenu);

    runMenu = new JMenu("Run");
    runMenu.setMnemonic(KeyEvent.VK_R);
    menuBar.add(runMenu);

    helpMenu = new JMenu("Help");
    helpMenu.setMnemonic(KeyEvent.VK_H);
    menuBar.add(helpMenu);

    loadSourceMenuItem = new JMenuItem("Load Source file", KeyEvent.VK_O);
    loadSourceMenuItem.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            loadSourceMenuItem_actionPerformed(e);
          }
        });
    fileMenu.add(loadSourceMenuItem);

    saveDestMenuItem = new JMenuItem("Save Destination file", KeyEvent.VK_S);
    saveDestMenuItem.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            saveDestMenuItem_actionPerformed(e);
          }
        });
    fileMenu.add(saveDestMenuItem);

    fileMenu.addSeparator();

    exitMenuItem = new JMenuItem("Exit", KeyEvent.VK_X);
    exitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.ALT_MASK));
    exitMenuItem.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            exitMenuItem_actionPerformed(e);
          }
        });
    fileMenu.add(exitMenuItem);

    singleStepMenuItem = new JMenuItem("Single Step", KeyEvent.VK_S);
    singleStepMenuItem.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            singleStepMenuItem_actionPerformed(e);
          }
        });
    runMenu.add(singleStepMenuItem);

    ffwdMenuItem = new JMenuItem("Fast Forward", KeyEvent.VK_F);
    ffwdMenuItem.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            ffwdMenuItem_actionPerformed(e);
          }
        });
    runMenu.add(ffwdMenuItem);

    stopMenuItem = new JMenuItem("Stop", KeyEvent.VK_T);
    stopMenuItem.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            stopMenuItem_actionPerformed(e);
          }
        });
    runMenu.add(stopMenuItem);

    rewindMenuItem = new JMenuItem("Rewind", KeyEvent.VK_R);
    rewindMenuItem.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            rewindMenuItem_actionPerformed(e);
          }
        });
    runMenu.add(rewindMenuItem);
    runMenu.addSeparator();

    fullTranslationMenuItem = new JMenuItem("Fast Translation", KeyEvent.VK_U);
    fullTranslationMenuItem.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            fullTranslationMenuItem_actionPerformed(e);
          }
        });
    runMenu.add(fullTranslationMenuItem);

    usageMenuItem = new JMenuItem("Usage", KeyEvent.VK_U);
    usageMenuItem.setAccelerator(KeyStroke.getKeyStroke("F1"));
    usageMenuItem.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            usageMenuItem_actionPerformed(e);
          }
        });
    helpMenu.add(usageMenuItem);

    aboutMenuItem = new JMenuItem("About...", KeyEvent.VK_A);
    aboutMenuItem.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            aboutMenuItem_actionPerformed(e);
          }
        });
    helpMenu.add(aboutMenuItem);
  }
 public void enableFullCompilation() {
   fullTranslationButton.setEnabled(true);
   fullTranslationMenuItem.setEnabled(true);
 }
 public void disableLoadSource() {
   loadButton.setEnabled(false);
   loadSourceMenuItem.setEnabled(false);
 }
 public void enableSave() {
   saveButton.setEnabled(true);
   saveDestMenuItem.setEnabled(true);
 }
 public void disableFullCompilation() {
   fullTranslationButton.setEnabled(false);
   fullTranslationMenuItem.setEnabled(false);
 }
 public void enableRewind() {
   rewindButton.setEnabled(true);
   rewindMenuItem.setEnabled(true);
 }
 public void disableSave() {
   saveButton.setEnabled(false);
   saveDestMenuItem.setEnabled(false);
 }
 public void enableSingleStep() {
   singleStepButton.setEnabled(true);
   singleStepMenuItem.setEnabled(true);
 }
 public void disableRewind() {
   rewindButton.setEnabled(false);
   rewindMenuItem.setEnabled(false);
 }
 public void disableSingleStep() {
   singleStepButton.setEnabled(false);
   singleStepMenuItem.setEnabled(false);
 }
 public void enableFastForward() {
   ffwdButton.setEnabled(true);
   ffwdMenuItem.setEnabled(true);
 }
 public void disableFastForward() {
   ffwdButton.setEnabled(false);
   ffwdMenuItem.setEnabled(false);
 }
 public void enableStop() {
   stopButton.setEnabled(true);
   stopMenuItem.setEnabled(true);
 }
 public void disableStop() {
   stopButton.setEnabled(false);
   stopMenuItem.setEnabled(false);
 }