/* * This is a programm for Morse. * * Copyright (C) 2014 - 2015 Marcel Michael Kapfer (marcelmichaelkapfer@yahoo.co.nz) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation version 3 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see http://www.gnu.org/licenses/. * * Version: 1.1.1 * */ package de.marcel_kapfer.c.morseconverter; import java.awt.BorderLayout; import java.awt.FlowLayout; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.swing.JLabel; import javax.swing.border.TitledBorder; import java.util.ResourceBundle; public class MissingCode extends JDialog { private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("de.marcel_kapfer.c.morseconverter.strings"); //$NON-NLS-1$ /** * */ private static final long serialVersionUID = 1L; private final JPanel contentPanel = new JPanel(); /** * Launch the application. */ public static void main(String[] args) { try { MissingCode dialog = new MissingCode(); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } /** * Create the dialog. */ public MissingCode() { setUndecorated(true); setResizable(false); setBounds(100, 100, 522, 263); getContentPane().setLayout(new BorderLayout()); contentPanel.setBorder(new EmptyBorder(0, 0, 0, 0)); getContentPane().add(contentPanel, BorderLayout.CENTER); contentPanel.setLayout(null); JPanel panel = new JPanel(); panel.setBorder(new TitledBorder(null, BUNDLE.getString("MissingCode.panel.borderTitle"), TitledBorder.LEADING, TitledBorder.TOP, null, null)); //$NON-NLS-1$ panel.setBounds(5, 17, 505, 199); contentPanel.add(panel); panel.setLayout(null); JLabel lblIntro = new JLabel(BUNDLE.getString("MissingCode.lblIntro.text")); //$NON-NLS-1$ lblIntro.setBounds(5, 17, 488, 15); panel.add(lblIntro); JLabel lblAddress = new JLabel(BUNDLE.getString("MissingCode.lblAddress.text")); //$NON-NLS-1$ lblAddress.setBounds(5, 71, 419, 15); panel.add(lblAddress); JLabel lblTitleIntro = new JLabel(BUNDLE.getString("MissingCode.lblTitleIntro.text")); //$NON-NLS-1$ lblTitleIntro.setBounds(5, 98, 92, 15); panel.add(lblTitleIntro); JLabel lblTitle = new JLabel(BUNDLE.getString("MissingCode.lblTitle.text")); //$NON-NLS-1$ lblTitle.setBounds(5, 125, 419, 15); panel.add(lblTitle); JLabel lblThanks = new JLabel(BUNDLE.getString("MissingCode.lblThanks.text")); //$NON-NLS-1$ lblThanks.setBounds(5, 179, 148, 15); panel.add(lblThanks); JLabel lblIntroTwo = new JLabel(BUNDLE.getString("MissingCode.lblIntroTwo.text")); //$NON-NLS-1$ lblIntroTwo.setBounds(5, 44, 488, 15); panel.add(lblIntroTwo); JLabel lblMissingCode = new JLabel(BUNDLE.getString("MissingCode.lblMissingCode.text")); //$NON-NLS-1$ lblMissingCode.setBounds(5, 152, 488, 15); panel.add(lblMissingCode); { JPanel buttonPane = new JPanel(); buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane, BorderLayout.SOUTH); { JButton cancelButton = new JButton(BUNDLE.getString("MissingCode.cancelButton.text")); //$NON-NLS-1$ cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { setVisible(false); dispose(); } }); cancelButton.setActionCommand(BUNDLE.getString("MissingCode.cancelButton.actionCommand")); //$NON-NLS-1$ buttonPane.add(cancelButton); } } } }