/*
 * ORBChatSplash.java
 *
 * Author: Jonathan Boldiga
 * Date: July 22, 2002
 *
 * Description: This is the splash screen for ORBChat, a CORBA based chat program.
 *				This class uses SWING, in particular JWindow which displays the splash
 *				image. To run ORBChat::Client, execute the Client.java class file.
 *
 * Copyright (c) 1993-2001 IONA Technologies PLC.
 *  			All Rights Reserved
 *
*/

package Chat;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class ORBChatSplash extends JWindow{

    public ORBChatSplash(Frame f){
        super(f);
        JLabel l = new JLabel(new ImageIcon("C:\\JB Programming\\Chat\\Classes\\Chat\\images\\IonaStart.gif"));
        getContentPane().add(l, BorderLayout.CENTER);
        pack();
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension labelSize = l.getPreferredSize();
        setLocation(screenSize.width/2 - (labelSize.width/2),
                    screenSize.height/2 - (labelSize.height/2));
        setVisible(true);
        screenSize = null;
        labelSize = null;
    }

    public void closeMe(){
		setVisible(false);
		dispose();
	}

}