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