001package jmri.jmrit.operations.setup; 002 003import java.awt.Frame; 004import java.awt.event.ActionEvent; 005 006import javax.swing.AbstractAction; 007 008/** 009 * Swing action to load the print options. 010 * 011 * @author Bob Jacobsen Copyright (C) 2001 012 * @author Daniel Boudreau Copyright (C) 2009 013 * 014 */ 015public class PrintMoreOptionAction extends AbstractAction { 016 017 public PrintMoreOptionAction() { 018 super(Bundle.getMessage("TitlePrintMoreOptions")); 019 } 020 021 PrintMoreOptionFrame f = null; 022 023 @Override 024 public void actionPerformed(ActionEvent e) { 025 if (f == null || !f.isVisible()) { 026 f = new PrintMoreOptionFrame(); 027 f.initComponents(); 028 } 029 f.setExtendedState(Frame.NORMAL); 030 f.setVisible(true); // this also brings the frame into focus 031 } 032} 033 034