/*
 * 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.0.2
 * 
 */

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 Bug extends JDialog {

	/**
	 * 
	 */
	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);
		setBounds(100, 100, 450, 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, "Bug", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel.setBounds(5, 17, 436, 199);
		contentPanel.add(panel);
		panel.setLayout(null);
		
		JLabel lblIntro = new JLabel("If you found a bug, please write me a mail to");
		lblIntro.setBounds(5, 17, 325, 15);
		panel.add(lblIntro);
		
		JLabel lblAddress = new JLabel("marcelmichaelkapfer@yahoo.co.nz");
		lblAddress.setBounds(5, 44, 419, 15);
		panel.add(lblAddress);
		
		JLabel lblTitleIntro = new JLabel("with the title");
		lblTitleIntro.setBounds(5, 71, 92, 15);
		panel.add(lblTitleIntro);
		
		JLabel lblTitle = new JLabel("Bug in Morse Version [your program version]");
		lblTitle.setBounds(5, 98, 316, 15);
		panel.add(lblTitle);
		
		JLabel lblDescription = new JLabel("a short description of the bug");
		lblDescription.setBounds(5, 125, 426, 15);
		panel.add(lblDescription);
		
		JLabel lblReproduce = new JLabel("and how to re-produce the bug.");
		lblReproduce.setBounds(5, 152, 325, 15);
		panel.add(lblReproduce);
		
		JLabel lblThanks = new JLabel("Thank you very much");
		lblThanks.setBounds(5, 179, 148, 15);
		panel.add(lblThanks);
		{
			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);
			}
		}
	}
}
