From 69f0e6b0bf0dc0a6c6fe8ccf17c74960697ca10c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 8 Feb 2009 01:37:25 +0000 Subject: 1.0 released --- client/SplashScreen.java | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 client/SplashScreen.java (limited to 'client/SplashScreen.java') diff --git a/client/SplashScreen.java b/client/SplashScreen.java new file mode 100644 index 0000000..5645bae --- /dev/null +++ b/client/SplashScreen.java @@ -0,0 +1,42 @@ +package client; + +import java.awt.*; +import javax.swing.*; +import shared.*; + +public class SplashScreen extends JWindow implements Runnable { + private static final long serialVersionUID = 1L; + + /** + * A simple little method to show a title screen in the center + * of the screen for the amount of time given in the constructor + */ + public void run() { + JPanel jPanel = (JPanel)getContentPane(); + jPanel.setBackground(Color.BLACK); + jPanel.setForeground(Color.WHITE); + + // Set the window's bounds, centering the window + int iWidth = 411; + int iHeight = 261; + Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); + + int x = (dimension.width-iWidth)/2; + int y = (dimension.height-iHeight)/2; + setBounds(x,y,iWidth,iHeight); + + JLabel jLabel = new JLabel(new ImageIcon("images/netcal.png")); + jPanel.add(jLabel, BorderLayout.CENTER); + jPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3)); + setVisible(true); + + try { + Thread.sleep(3000); + + } catch (Exception e) { + Main.infoMessage(e.getMessage()); + } + + dispose(); + } +} \ No newline at end of file -- cgit v1.2.3