/* SplashScreen.java */
 
 import javax.swing.*;
 import javax.swing.border.*;
 import java.awt.*;
 import java.awt.event.*;
 
 public class JW_bsp1 extends JWindow
 {
   public JW_bsp1(String image, String text)
   {
     JPanel contentPane = new JPanel(); 
     contentPane.setLayout(new BorderLayout());
     Border bd1 = BorderFactory.createBevelBorder( 
       BevelBorder.RAISED
     );
     Border bd2 = BorderFactory.createEtchedBorder();
     Border bd3 = BorderFactory.createCompoundBorder(bd1, bd2);
     ((JPanel)contentPane).setBorder(bd3);
     ImageIcon icon = new ImageIcon(image);
     contentPane.add("North",  new JLabel(" ", JLabel.CENTER));
     contentPane.add("Center", new JLabel(icon, JLabel.CENTER));
     contentPane.add("South",  new JLabel(text, JLabel.CENTER));
     setContentPane(contentPane); 
   }
 
   public void showFor(int millis)
   {
     Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
     setLocation(dim.width / 3, dim.height / 3);
     setSize(dim.width / 3, dim.height / 3);
     setVisible(true);
     try {
       Thread.sleep(millis);
     } catch (InterruptedException e) {
     }
     setVisible(false);
   }
 
   public static void main(String[] args)
   {
     JW_bsp1 intro = new JW_bsp1(
       "duke_running.gif", 
       "(C) Copyright 2010, J. Krüger, All Rights Reserved"
     );
     intro.showFor(5000);
     System.exit(0);
   }
 }