001package jmri.jmrix.lenz.swing.lv102;
002
003import javax.swing.BoxLayout;
004import javax.swing.JButton;
005import javax.swing.JPanel;
006
007/**
008 * Frame displaying the LV102 configuration utility
009 * <p>
010 * This is a container for the LV102 configuration utility. The actual utility
011 * is defined in {@link LV102InternalFrame}
012 *
013 * @author Paul Bender Copyright (C) 2004,2005
014 */
015public class LV102Frame extends jmri.util.JmriJFrame {
016
017    public LV102Frame() {
018        this(Bundle.getMessage("MenuItemLV102ConfigurationManager"));
019    }
020
021    public LV102Frame(String FrameName) {
022
023        super(FrameName);
024
025        getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
026
027        javax.swing.JInternalFrame LV102IFrame = new LV102InternalFrame();
028
029        javax.swing.JPanel pane0 = new JPanel();
030        pane0.add(LV102IFrame);
031        getContentPane().add(pane0);
032
033        JPanel pane1 = new JPanel();
034        pane1.add(closeButton);
035        getContentPane().add(pane1);
036
037        // and prep for display
038        pack();
039
040        // install close button handler
041        closeButton.addActionListener(a -> {
042            setVisible(false);
043            dispose();
044        });
045    }
046
047    final JButton closeButton = new JButton(Bundle.getMessage("ButtonClose"));
048
049}