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();
}
}