/*  AboutDialog.java
 *  
 *  This is a simple dialog that displays the basics of
 *  the software. Accessed fromt he main menu
 *
 *  Created on August 17, 2005, 11:53 AM
 *
 *  Author: Michael A. Piskuric (2537405) Summer 2005
 */

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

public class AboutDialog extends javax.swing.JFrame implements ActionListener {
    
    public AboutDialog() {
        initComponents();
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        int x = (int)((screenSize.getWidth()/2) - 200);
        int y = (int)((screenSize.getHeight()/2) - 150);        
        setLocation(x,y);
        setSize(400,300);
        okButton.addActionListener(this);
        setVisible(true);
    }
    

    private void initComponents() {
        jLabel1 = new javax.swing.JLabel();
        okButton = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();

        getContentPane().setLayout(null);

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("About TeachVAL II");
        setName("about");
        setUndecorated(true);
        jLabel1.setFont(new java.awt.Font("Arial", 1, 48));
        jLabel1.setText("TeachVAL II");
        getContentPane().add(jLabel1);
        jLabel1.setBounds(10, 10, 280, 70);

        okButton.setText("Done");
        getContentPane().add(okButton);
        okButton.setBounds(160, 260, 75, 23);

        jLabel2.setIcon(new javax.swing.ImageIcon("bin/logo.jpg"));
        getContentPane().add(jLabel2);
        jLabel2.setBounds(210, 70, 170, 170);

        jLabel3.setText("Created By: Michael Piskuric");
        getContentPane().add(jLabel3);
        jLabel3.setBounds(20, 100, 190, 14);

        jLabel4.setText("COSC 3P99 (Summer 2005)");
        getContentPane().add(jLabel4);
        jLabel4.setBounds(20, 130, 180, 14);

        jLabel5.setText("Copyright 2005");
        getContentPane().add(jLabel5);
        jLabel5.setBounds(20, 160, 150, 14);

        jPanel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0)));
        getContentPane().add(jPanel1);
        jPanel1.setBounds(0, 0, 400, 300);

        pack();
    }
    
    
    public void actionPerformed(java.awt.event.ActionEvent evt) {
        JButton temp = (JButton)evt.getSource();
        if(temp.getText() == "Done"){
            this.dispose();
        }
    }    
    
    
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JButton okButton;
    
    
}
