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-16 11:16:22 +01:00
|
|
|
* Version: 1.1.0
|
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 javax.swing.JLabel;
|
|
|
|
import javax.swing.border.TitledBorder;
|
|
|
|
import java.awt.event.ActionListener;
|
|
|
|
import java.awt.event.ActionEvent;
|
2015-02-15 23:01:03 +01:00
|
|
|
import java.util.ResourceBundle;
|
2015-01-02 11:25:12 +01:00
|
|
|
|
|
|
|
public class HowTo 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 {
|
|
|
|
HowTo dialog = new HowTo();
|
|
|
|
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
|
|
|
dialog.setVisible(true);
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create the dialog.
|
|
|
|
*/
|
|
|
|
public HowTo() {
|
2015-02-15 23:01:03 +01:00
|
|
|
setTitle(BUNDLE.getString("HowTo.this.title")); //$NON-NLS-1$
|
2015-01-02 11:25:12 +01:00
|
|
|
setUndecorated(true);
|
2015-02-15 23:01:03 +01:00
|
|
|
setBounds(100, 100, 579, 128);
|
2015-01-02 11:25:12 +01:00
|
|
|
getContentPane().setLayout(new BorderLayout());
|
|
|
|
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
|
|
|
|
getContentPane().add(contentPanel, BorderLayout.CENTER);
|
|
|
|
contentPanel.setLayout(null);
|
|
|
|
{
|
|
|
|
JPanel jPanel = new JPanel();
|
2015-02-15 23:01:03 +01:00
|
|
|
jPanel.setBorder(new TitledBorder(null, BUNDLE.getString("HowTo.jPanel.borderTitle"), TitledBorder.LEADING, TitledBorder.TOP, null, null)); //$NON-NLS-1$
|
|
|
|
jPanel.setBounds(5, 12, 562, 68);
|
2015-01-02 11:25:12 +01:00
|
|
|
contentPanel.add(jPanel);
|
|
|
|
jPanel.setLayout(null);
|
|
|
|
{
|
2015-02-15 23:01:03 +01:00
|
|
|
JLabel lblIntro = new JLabel(BUNDLE.getString("HowTo.lblIntro.text")); //$NON-NLS-1$
|
2015-01-02 11:25:12 +01:00
|
|
|
lblIntro.setBounds(5, 17, 448, 15);
|
|
|
|
jPanel.add(lblIntro);
|
|
|
|
}
|
|
|
|
{
|
2015-02-15 23:01:03 +01:00
|
|
|
JLabel lblHttpwwwmarcelkapferdeprojectsmorseindexhtmlhowto = new JLabel(BUNDLE.getString("HowTo.lblHttpwwwmarcelkapferdeprojectsmorseindexhtmlhowto.text")); //$NON-NLS-1$
|
|
|
|
lblHttpwwwmarcelkapferdeprojectsmorseindexhtmlhowto.setBounds(5, 41, 545, 15);
|
2015-01-02 11:25:12 +01:00
|
|
|
jPanel.add(lblHttpwwwmarcelkapferdeprojectsmorseindexhtmlhowto);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
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("HowTo.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("HowTo.cancelButton.actionCommand")); //$NON-NLS-1$
|
2015-01-02 11:25:12 +01:00
|
|
|
buttonPane.add(cancelButton);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|