001package jmri.jmrit.operations.trains.excel; 002 003import java.awt.Frame; 004import java.awt.event.ActionEvent; 005 006import javax.swing.AbstractAction; 007 008/** 009 * Swing action to launch the SetupExcelProgramFrame. 010 * 011 * @author Daniel Boudreau Copyright (C) 2013 012 * 013 */ 014public class SetupExcelProgramFrameAction extends AbstractAction { 015 016 public SetupExcelProgramFrameAction() { 017 super(Bundle.getMessage("MenuItemSetupExcelProgram")); 018 } 019 020 SetupExcelProgramManifestFrame f = null; 021 022 @Override 023 public void actionPerformed(ActionEvent e) { 024 // create a train scripts frame 025 if (f != null && f.isVisible()) { 026 f.dispose(); 027 } 028 f = new SetupExcelProgramManifestFrame(); 029 f.initComponents(); 030 f.setExtendedState(Frame.NORMAL); 031 } 032} 033 034