menuBar.add(statusMenu);
  public ConsoleInternalFrame(NodeComponent node,                               ConsoleNodeListener listener,                              JComponent component) {    super("",   // title          true, //resizable          false, //not closable, because they can't be recreated          true, //maximizable          true);//iconifiable    this.node = node;    this.listener = listener;    this.component = component;    // get host component by getting the experiment and     // searching its hosts for one with this node.    Experiment experiment =       (Experiment)getPropertyValue((ConfigurableComponent)node, "Experiment");    HostComponent[] hosts = experiment.getHosts();    for (int i = 0; i < hosts.length; i++) {      NodeComponent[] nodes = hosts[i].getNodes();      for (int j = 0; j < nodes.length; j++) {        if (nodes[j].equals(node)) {          host = hosts[i];          hostName = host.getShortName();          break;        }      }    }    // title is "node name:host name"    setTitle(node.getShortName() + ":" + hostName);    // init menu    JMenuBar menuBar = new JMenuBar();    JMenu aboutMenu = new JMenu(ABOUT_MENU);    Action aboutAction = new AbstractAction(ABOUT_ACTION) {      public void actionPerformed(ActionEvent e) {        displayAbout();      }    };    aboutMenu.add(aboutAction);    Action cpuUsageAction = new AbstractAction(CPU_USAGE_ACTION) {      public void actionPerformed(ActionEvent e) {      }    };    aboutMenu.add(cpuUsageAction);    Action memoryUsageAction = new AbstractAction(MEMORY_USAGE_ACTION) {      public void actionPerformed(ActionEvent e) {      }    };    aboutMenu.add(memoryUsageAction);    JMenu controlMenu = new JMenu(CONTROL_MENU);    Action startAction = new AbstractAction(START_ACTION) {      public void actionPerformed(ActionEvent e) {      }    };    controlMenu.add(startAction);    Action stopAction = new AbstractAction(STOP_ACTION) {      public void actionPerformed(ActionEvent e) {      }    };    controlMenu.add(stopAction);    Action traceAction = new AbstractAction(TRACE_ACTION) {      public void actionPerformed(ActionEvent e) {      }    };    controlMenu.add(traceAction);    JMenu searchMenu = new JMenu(SEARCH_MENU);    searchAction = new AbstractAction(SEARCH_ACTION) {      public void actionPerformed(ActionEvent e) {        search_actionPerformed();      }    };    searchMenu.add(searchAction);    searchNextAction = new AbstractAction(SEARCH_NEXT_ACTION) {      public void actionPerformed(ActionEvent e) {        searchNext_actionPerformed();      }    };    searchMenu.add(searchNextAction);    JMenu statusMenu = new JMenu(STATUS_MENU);    Action historyAction = new AbstractAction(HISTORY_ACTION) {      public void actionPerformed(ActionEvent e) {	history_actionPerformed();      }    };    statusMenu.add(historyAction);    menuBar.add(aboutMenu);    menuBar.add(controlMenu);    menuBar.add(searchMenu);    menuBar.add(statusMenu);    getRootPane().setJMenuBar(menuBar);    initKeyMap((ConsoleTextPane)component);    openFrameCount++;    getContentPane().add(component);    setSize(300,300);    //Set the window's location.    setLocation(xOffset*openFrameCount, yOffset*openFrameCount);  }