0

I HAVE TRYING SPLASH SCREEN IN MY APP, BUT CANT GET THE BASICS YET.. SPLSAH SCREEN ISNT WORKING, CAN ANYONE GIVE ME A SIMPLE EXAMPLE
hERE is my code.

import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;

import javax.swing.JWindow;


public class introduction extends JWindow {
	
	private Image img;
	
	introduction()
	{
		setSize(128,128);
		img = Toolkit.getDefaultToolkit().getImage("images//loader.gif");
		setLocation(Toolkit.getDefaultToolkit().getScreenSize().width/3,Toolkit.getDefaultToolkit().getScreenSize().height/3);
	}
	
	public void paint(Graphics g)
	{
		g.drawImage(img,this.getSize().width,this.getSize().height,this);
	}
	
	public void setWindowVisible(boolean value)
	{
		setVisible(value);
	}
	
	public void closeWindow()
	{
		this.dispose();
	}
	

}
2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by Majestics
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.