1 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("icons/logo.png")); 29 productName = new JLabel("<html><font face=\"Verdana\" size=\"3\"> Loading..</font><br>"+ 30 "<font face=\"Verdana\" size=\"5\">QSAdminGUI</font>",logo,JLabel.CENTER); 31 productName.setBackground(new Color(238,238,230,255)); productName.setOpaque(true); 33 34 productName.setBorder(BorderFactory.createCompoundBorder( 35 BorderFactory.createEmptyBorder(10,10,10,10), 36 BorderFactory.createLineBorder(Color.black) )); 37 getContentPane().add(productName); 38 Dimension dim=productName.getPreferredSize(); 39 dim.setSize(dim.getWidth()+10,dim.getHeight()+10); 40 setSize(dim); 41 JFrameUtilities.centerWindow(this); 42 setVisible(true); 43 } 44 45 public void kill() { 46 dispose(); 47 } 48 } 49 | Popular Tags |