frame.addInternalFrameListener(frameListener);
  public void addNodeFrame(NodeComponent node,                            ConsoleNodeListener listener,                           InternalFrameListener frameListener,                           JScrollPane pane,                           JRadioButton statusButton,                           String logFileName,                           RemoteProcess remoteNode,                           CSMARTConsole console) {    JInternalFrame frame =       new ConsoleInternalFrame(node, listener, pane,                               statusButton, logFileName, remoteNode, console);    //Set the window's location.    frameCount++;    Insets insets = this.getInsets();    int dx = getWidth() - insets.left - insets.right - frame.getWidth();    int dy = getHeight() - insets.top - insets.bottom - frame.getHeight();    int x = (dx <= 0) ? 0 : ((frameXOffset * frameCount) % dx);    int y = (dy <= 0) ? 0 : ((frameYOffset * frameCount) % dy);    frame.setLocation(x, y);    frame.addInternalFrameListener(frameListener);    addFrame(frame, true);    myFrames.put(node.getShortName(), frame);  }