I am trying to draw about 100 images on the Applet. When i did that I was not able to look at an image as the process was too fast. So I added sleep function so that I can give a pause between transition from one image to another. But that worked abnormally. I could not see any pictures and I think the sleep is getting called again and again. Please help.
Here is my code:
public class Test extends Applet
{
public void init()
{
setSize(1000,1000);
}
public void make(Graphics g,int i)
{
}
public void paint(Graphics g)
{
int i=0;
for(i=0;i<100;i++)
{
if(i!=65)
{
Image img = getImage(getDocumentBase(), "abc"+i+".png");
g.drawImage(img, 0, 0, this);
try
{
Thread.sleep(1000);
}
catch(Exception exception)
{
}
}
}
}
}
Now you can see I have images from 0 to 99 and I want them on my Applet window and after an image is displayed 1 sec delay should be there. But this is not the case. Please help