Package renamed to meet the java name conventions
This commit is contained in:
parent
ee6b497301
commit
f147ec1d72
7 changed files with 7 additions and 18 deletions
124
src/de/marcel_kapfer/c/morseconverter/About.java
Normal file
124
src/de/marcel_kapfer/c/morseconverter/About.java
Normal file
|
@ -0,0 +1,124 @@
|
|||
/*
|
||||
* 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 java.awt.event.ActionListener;
|
||||
import java.awt.event.ActionEvent;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.border.TitledBorder;
|
||||
|
||||
public class About extends JDialog {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final JPanel contentPanel = new JPanel();
|
||||
|
||||
/**
|
||||
* Launch the application.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
About dialog = new About();
|
||||
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
||||
dialog.setVisible(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the dialog.
|
||||
*/
|
||||
public About() {
|
||||
setResizable(false);
|
||||
setUndecorated(true);
|
||||
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
||||
setBounds(100, 100, 450, 223);
|
||||
getContentPane().setLayout(new BorderLayout());
|
||||
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||||
getContentPane().add(contentPanel, BorderLayout.CENTER);
|
||||
contentPanel.setLayout(null);
|
||||
|
||||
JPanel panel = new JPanel();
|
||||
panel.setBorder(new TitledBorder(null, "About", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
||||
panel.setBounds(5, 17, 436, 148);
|
||||
contentPanel.add(panel);
|
||||
panel.setLayout(null);
|
||||
|
||||
JLabel lblDeveloper = new JLabel("Marcel Kapfer");
|
||||
lblDeveloper.setBounds(124, 17, 307, 15);
|
||||
panel.add(lblDeveloper);
|
||||
|
||||
JLabel lblDev = new JLabel("Developer");
|
||||
lblDev.setBounds(12, 17, 100, 15);
|
||||
panel.add(lblDev);
|
||||
|
||||
JLabel lblWeb = new JLabel("Website");
|
||||
lblWeb.setBounds(12, 44, 100, 15);
|
||||
panel.add(lblWeb);
|
||||
|
||||
JLabel lblCont = new JLabel("Contact");
|
||||
lblCont.setBounds(12, 71, 100, 15);
|
||||
panel.add(lblCont);
|
||||
|
||||
JLabel lblVer = new JLabel("Version");
|
||||
lblVer.setBounds(12, 98, 100, 15);
|
||||
panel.add(lblVer);
|
||||
|
||||
JLabel lblLic = new JLabel("License");
|
||||
lblLic.setBounds(12, 125, 100, 15);
|
||||
panel.add(lblLic);
|
||||
|
||||
JLabel lblWebsite = new JLabel("marcel-kapfer.de/projects/morse");
|
||||
lblWebsite.setBounds(124, 44, 307, 15);
|
||||
panel.add(lblWebsite);
|
||||
|
||||
JLabel lblContact = new JLabel("marcelmichaelkapfer@yahoo.co.nz");
|
||||
lblContact.setBounds(124, 71, 307, 15);
|
||||
panel.add(lblContact);
|
||||
|
||||
JLabel lblVersion = new JLabel("1.0.0");
|
||||
lblVersion.setBounds(124, 98, 307, 15);
|
||||
panel.add(lblVersion);
|
||||
|
||||
JLabel lblLicense = new JLabel("GNU v3.0");
|
||||
lblLicense.setBounds(124, 125, 307, 15);
|
||||
panel.add(lblLicense);
|
||||
{
|
||||
JPanel buttonPane = new JPanel();
|
||||
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
|
||||
getContentPane().add(buttonPane, BorderLayout.SOUTH);
|
||||
{
|
||||
JButton cancelButton = new JButton("Close");
|
||||
cancelButton.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
setVisible(false);
|
||||
dispose();
|
||||
}
|
||||
});
|
||||
cancelButton.setActionCommand("Cancel");
|
||||
buttonPane.add(cancelButton);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in a new issue