2015-01-02 11:25:12 +01:00
|
|
|
/*
|
|
|
|
* This is a programm for Morse.
|
|
|
|
*
|
2015-01-03 00:41:30 +01:00
|
|
|
* 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/.
|
2015-01-02 11:25:12 +01:00
|
|
|
*
|
2015-02-17 10:49:11 +01:00
|
|
|
* Version: 1.1.1
|
2015-01-02 11:25:12 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-01-02 19:39:44 +01:00
|
|
|
package de.marcel_kapfer.c.morseconverter;
|
2015-01-02 11:25:12 +01:00
|
|
|
|
|
|
|
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;
|
2015-02-15 23:01:03 +01:00
|
|
|
import java.util.ResourceBundle;
|
2015-01-02 11:25:12 +01:00
|
|
|
|
|
|
|
public class Bug extends JDialog {
|
2015-02-15 23:01:03 +01:00
|
|
|
private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("de.marcel_kapfer.c.morseconverter.strings"); //$NON-NLS-1$
|
2015-01-02 11:25:12 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private final JPanel contentPanel = new JPanel();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Launch the application.
|
|
|
|
*/
|
|
|
|
public static void main(String[] args) {
|
|
|
|
try {
|
|
|
|
Bug dialog = new Bug();
|
|
|
|
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
|
|
|
dialog.setVisible(true);
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create the dialog.
|
|
|
|
*/
|
|
|
|
public Bug() {
|
|
|
|
setUndecorated(true);
|
|
|
|
setResizable(false);
|
2015-02-15 23:01:03 +01:00
|
|
|
setBounds(100, 100, 575, 263);
|
2015-01-02 11:25:12 +01:00
|
|
|
getContentPane().setLayout(new BorderLayout());
|
|
|
|
contentPanel.setBorder(new EmptyBorder(0, 0, 0, 0));
|
|
|
|
getContentPane().add(contentPanel, BorderLayout.CENTER);
|
|
|
|
contentPanel.setLayout(null);
|
|
|
|
|
|
|
|
JPanel panel = new JPanel();
|
2015-02-15 23:01:03 +01:00
|
|
|
panel.setBorder(new TitledBorder(null, BUNDLE.getString("Bug.panel.borderTitle"), TitledBorder.LEADING, TitledBorder.TOP, null, null)); //$NON-NLS-1$
|
|
|
|
panel.setBounds(5, 17, 558, 199);
|
2015-01-02 11:25:12 +01:00
|
|
|
contentPanel.add(panel);
|
|
|
|
panel.setLayout(null);
|
|
|
|
|
2015-02-15 23:01:03 +01:00
|
|
|
JLabel lblIntro = new JLabel(BUNDLE.getString("Bug.lblIntro.text")); //$NON-NLS-1$
|
|
|
|
lblIntro.setBounds(5, 17, 541, 15);
|
2015-01-02 11:25:12 +01:00
|
|
|
panel.add(lblIntro);
|
|
|
|
|
2015-02-15 23:01:03 +01:00
|
|
|
JLabel lblAddress = new JLabel(BUNDLE.getString("Bug.lblAddress.text")); //$NON-NLS-1$
|
2015-01-02 11:25:12 +01:00
|
|
|
lblAddress.setBounds(5, 44, 419, 15);
|
|
|
|
panel.add(lblAddress);
|
|
|
|
|
2015-02-15 23:01:03 +01:00
|
|
|
JLabel lblTitleIntro = new JLabel(BUNDLE.getString("Bug.lblTitleIntro.text")); //$NON-NLS-1$
|
2015-01-02 11:25:12 +01:00
|
|
|
lblTitleIntro.setBounds(5, 71, 92, 15);
|
|
|
|
panel.add(lblTitleIntro);
|
|
|
|
|
2015-02-15 23:01:03 +01:00
|
|
|
JLabel lblTitle = new JLabel(BUNDLE.getString("Bug.lblTitle.text")); //$NON-NLS-1$
|
|
|
|
lblTitle.setBounds(5, 98, 541, 15);
|
2015-01-02 11:25:12 +01:00
|
|
|
panel.add(lblTitle);
|
|
|
|
|
2015-02-15 23:01:03 +01:00
|
|
|
JLabel lblDescription = new JLabel(BUNDLE.getString("Bug.lblDescription.text")); //$NON-NLS-1$
|
2015-01-02 11:25:12 +01:00
|
|
|
lblDescription.setBounds(5, 125, 426, 15);
|
|
|
|
panel.add(lblDescription);
|
|
|
|
|
2015-02-15 23:01:03 +01:00
|
|
|
JLabel lblReproduce = new JLabel(BUNDLE.getString("Bug.lblReproduce.text")); //$NON-NLS-1$
|
2015-01-02 11:25:12 +01:00
|
|
|
lblReproduce.setBounds(5, 152, 325, 15);
|
|
|
|
panel.add(lblReproduce);
|
|
|
|
|
2015-02-15 23:01:03 +01:00
|
|
|
JLabel lblThanks = new JLabel(BUNDLE.getString("Bug.lblThanks.text")); //$NON-NLS-1$
|
2015-01-02 11:25:12 +01:00
|
|
|
lblThanks.setBounds(5, 179, 148, 15);
|
|
|
|
panel.add(lblThanks);
|
|
|
|
{
|
|
|
|
JPanel buttonPane = new JPanel();
|
|
|
|
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
|
|
|
|
getContentPane().add(buttonPane, BorderLayout.SOUTH);
|
|
|
|
{
|
2015-02-15 23:01:03 +01:00
|
|
|
JButton cancelButton = new JButton(BUNDLE.getString("Bug.cancelButton.text")); //$NON-NLS-1$
|
2015-01-02 11:25:12 +01:00
|
|
|
cancelButton.addActionListener(new ActionListener() {
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
|
setVisible(false);
|
|
|
|
dispose();
|
|
|
|
}
|
|
|
|
});
|
2015-02-15 23:01:03 +01:00
|
|
|
cancelButton.setActionCommand(BUNDLE.getString("Bug.cancelButton.actionCommand")); //$NON-NLS-1$
|
2015-01-02 11:25:12 +01:00
|
|
|
buttonPane.add(cancelButton);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|