/*  Splash.java
 *  
 *  Created on August 17, 2005, 10:41 AM
 *  
 *  This is a simple splash screen that appears at 
 *  the start of execution
 *
 *  Author: Michael A. Piskuric (2537405) Summer 2005
 */

import java.awt.*;

public class Splash extends javax.swing.JFrame {
    
    /** Creates new form Splash */
    public Splash() {
        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);
        setVisible(true);
        for(int i=0; i<=100; i++) {
            progBar.setValue(i);
            try{synchronized (this) {wait(50);}}
            catch(Exception e){};          
        }
        this.dispose();
    }
    
    private void initComponents() {
        jLabel1 = new javax.swing.JLabel();
        progBar = new javax.swing.JProgressBar();
        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("TeachVAL II");
        setFocusCycleRoot(false);
        setLocationByPlatform(true);
        setName("splash");
        setResizable(false);
        setUndecorated(true);
        getAccessibleContext().setAccessibleName("Splash");
        jLabel1.setFont(new java.awt.Font("Arial", 1, 48));
        jLabel1.setText("TeachVAL II");
        getContentPane().add(jLabel1);
        jLabel1.setBounds(10, 20, 320, 70);

        getContentPane().add(progBar);
        progBar.setBounds(20, 260, 360, 16);

        jLabel2.setText("By: Michael Piskuric");
        getContentPane().add(jLabel2);
        jLabel2.setBounds(20, 120, 170, 14);

        jLabel3.setText("COSC 3P99 (Summer 2005)");
        getContentPane().add(jLabel3);
        jLabel3.setBounds(20, 140, 160, 14);

        jLabel4.setText("Please Wait. Loading... ");
        getContentPane().add(jLabel4);
        jLabel4.setBounds(40, 240, 140, 14);

        jLabel5.setIcon(new javax.swing.ImageIcon("bin/logo.jpg"));
        jLabel5.setText("jLabel5");
        getContentPane().add(jLabel5);
        jLabel5.setBounds(190, 80, 170, 170);

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

        pack();
    }
        
    
    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.JProgressBar progBar;
    
    
}
