1   /*
2    * IntroScene.java
3    *
4    * Created on August 8, 2003, 3:09 PM
5    */
6   
7   package intellego;
8   
9   import intellego.Intellego;
10  import util.*;
11  import interfaces.*;
12  import real.*;
13  import main.*;
14  import NetBeansResources.*;
15  
16  import java.awt.*;
17  import java.lang.*;
18  import java.awt.event.*;
19  import javax.swing.*;
20  import java.io.*;
21  import javax.imageio.*;
22  import java.awt.image.*;
23  
24  /** Loads the introscene while the application is being complied
25   * @author Simon Zienkiewicz
26   */
27  public class IntroScene extends JDialog implements ActionListener {
28      
29      private Timer exitTimer;
30      
31      /** Creates a new instance of IntroScene */
32      public IntroScene() {
33                  
34          //place JDialog in the center of the screen
35          Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
36          this.setBounds(screenSize.width/2-200,screenSize.height/2-150, 400, 300);
37          
38          this.setResizable(false);
39                  
40          Container mainPanel=getContentPane();
41          mainPanel.setLayout(new BorderLayout(1,1));
42          
43          mainPanel.add(new GetImage());
44          this.setDefaultLookAndFeelDecorated(false);
45          this.setUndecorated(true);
46                     
47          this.show();
48          exitTimer = new Timer(8000,this);
49          exitTimer.start();
50         
51      }
52      
53      /** Execution method for timer event.
54       * @param e executed event
55       */    
56      public void actionPerformed(ActionEvent e) {
57          if(e.getSource() == exitTimer){
58              this.dispose();
59              System.exit(0);
60          }
61      }
62      
63      /** The main class.
64       * @param args arguements
65       */    
66      public static void main(String[] args){
67          IntroScene intro = new IntroScene();
68      }
69  }
70