package sim;

import java.awt.*;

public class SplashWindow extends Window
{
	private Image splash = GuiFileLink.getImage("sim/images/Splash.gif");
	
	public SplashWindow(Frame f)
	{
		super(f);
		
		this.setSize(454, 283);
		this.setLocation(MainWindow.getMiddleOfScreen(this));
		this.setVisible(true);
	}
	
	public void setVisible(boolean value)
	{
		super.setVisible(value);
		
		if(!value)
			this.splash.flush();
	}
	
	public void paint(Graphics g)
	{
		g.drawImage(this.splash, 0, 0, null);
	}
	
	 public void removeNotify()
	 {
		 this.splash.flush();
		 super.removeNotify();
		 System.gc();
	 }
}
