public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); if (cmd.equals("cancel")) { this.dispose(); timer.cancel(); } else if (cmd.equals("ok")) { StnPlotSpecification spec = createPlotSpec(); try { spec.writeToLog("New Station Value Plot (" + mFileViewer.getTitle() + "):"); } catch (Exception ex) { } JOAStnValPlotWindow plotWind = new JOAStnValPlotWindow(spec, mFileViewer); plotWind.pack(); plotWind.setVisible(true); mFileViewer.addOpenWindow(plotWind); timer.cancel(); this.dispose(); } }