01: /*
02: * This file is part of the QuickServer library
03: * Copyright (C) 2003-2005 QuickServer.org
04: *
05: * Use, modification, copying and distribution of this software is subject to
06: * the terms and conditions of the GNU Lesser General Public License.
07: * You should have received a copy of the GNU LGP License along with this
08: * library; if not, you can download a copy from <http://www.quickserver.org/>.
09: *
10: * For questions, suggestions, bug-reports, enhancement-requests etc.
11: * visit http://www.quickserver.org
12: *
13: */
14:
15: package org.quickserver.net.qsadmin.gui;
16:
17: import java.awt.*;
18: import javax.swing.*;
19: import javax.swing.border.*;
20: import java.awt.event.*;
21: import org.quickserver.swing.JFrameUtilities;
22:
23: public class SplashScreen extends JWindow {
24: protected ImageIcon logo;
25: protected JLabel productName;
26:
27: public SplashScreen() {
28: logo = new ImageIcon(getClass().getClassLoader().getResource(
29: "icons/logo.png"));
30: productName = new JLabel(
31: "<html><font face=\"Verdana\" size=\"3\"> Loading..</font><br>"
32: + "<font face=\"Verdana\" size=\"5\">QSAdminGUI</font>",
33: logo, JLabel.CENTER);
34: productName.setBackground(new Color(238, 238, 230, 255));//Color.white);
35: productName.setOpaque(true);
36:
37: productName.setBorder(BorderFactory.createCompoundBorder(
38: BorderFactory.createEmptyBorder(10, 10, 10, 10),
39: BorderFactory.createLineBorder(Color.black)));
40: getContentPane().add(productName);
41: Dimension dim = productName.getPreferredSize();
42: dim.setSize(dim.getWidth() + 10, dim.getHeight() + 10);
43: setSize(dim);
44: JFrameUtilities.centerWindow(this );
45: setVisible(true);
46: }
47:
48: public void kill() {
49: dispose();
50: }
51: }
|