96 lines
2.4 KiB
Java
96 lines
2.4 KiB
Java
/*
|
|
* This is a programm for Morse.
|
|
*
|
|
* Marcel Michael Kapfer
|
|
*
|
|
* GPL v3.0
|
|
*
|
|
* 2014
|
|
*
|
|
* Version: 1.0.0
|
|
*
|
|
*/
|
|
|
|
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 javax.swing.JLabel;
|
|
import javax.swing.border.TitledBorder;
|
|
import java.awt.event.ActionListener;
|
|
import java.awt.event.ActionEvent;
|
|
|
|
public class HowTo extends JDialog {
|
|
|
|
/**
|
|
*
|
|
*/
|
|
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() {
|
|
setTitle("How to");
|
|
setUndecorated(true);
|
|
setBounds(100, 100, 474, 128);
|
|
getContentPane().setLayout(new BorderLayout());
|
|
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
|
|
getContentPane().add(contentPanel, BorderLayout.CENTER);
|
|
contentPanel.setLayout(null);
|
|
{
|
|
JPanel jPanel = new JPanel();
|
|
jPanel.setBorder(new TitledBorder(null, "How to", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
|
jPanel.setBounds(5, 12, 462, 68);
|
|
contentPanel.add(jPanel);
|
|
jPanel.setLayout(null);
|
|
{
|
|
JLabel lblIntro = new JLabel("A detailed description about how to use this software is on:");
|
|
lblIntro.setBounds(5, 17, 448, 15);
|
|
jPanel.add(lblIntro);
|
|
}
|
|
{
|
|
JLabel lblHttpwwwmarcelkapferdeprojectsmorseindexhtmlhowto = new JLabel("http://www.marcel-kapfer.de/projects/morse/index.html#howto");
|
|
lblHttpwwwmarcelkapferdeprojectsmorseindexhtmlhowto.setBounds(5, 44, 448, 15);
|
|
jPanel.add(lblHttpwwwmarcelkapferdeprojectsmorseindexhtmlhowto);
|
|
}
|
|
}
|
|
{
|
|
JPanel buttonPane = new JPanel();
|
|
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
|
|
getContentPane().add(buttonPane, BorderLayout.SOUTH);
|
|
{
|
|
JButton cancelButton = new JButton("Cancel");
|
|
cancelButton.addActionListener(new ActionListener() {
|
|
public void actionPerformed(ActionEvent e) {
|
|
setVisible(false);
|
|
dispose();
|
|
}
|
|
});
|
|
cancelButton.setActionCommand("Cancel");
|
|
buttonPane.add(cancelButton);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|