package j3deditor.bin.util.startup;


import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JDialog;


/**
 * Splash screen window.
 *
 * @author Risto Seene
 */
public class StartUp extends JDialog{

	/** Splash screen panel. */
	private StartPanel start;


	/**
	 * Creates an instance of <code>StartUp</code>.
	 */
	public StartUp(){
		super();
		Dimension size = new Dimension(400, 300);

		setUndecorated(true);
		setSize(size);

		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
		setLocation((int)((dim.getWidth() - size.getWidth()) / 2), (int)((dim.getHeight() - size.getHeight()) / 2));

		start = new StartPanel();
		add(start);

		setVisible(true);
	}


	/**
	 * Replaces the information shown on splash screen panel.
	 *
	 * @param info
	 *	information to be shown
	 */
	public void setInfo(String info){
		start.setInfo(info);
	}

}
