Hai ,
I want to load images dynamically to my applet.
I have four file names..
String fileNames[] = {"test1.png","test2.png","test3.png","test4.png "};

I want to load the images one at a time to my applet I am using the code

public void paint(Graphics g){
i= (i+1)%4;
Image img = getImage(getCodeBase(),fileNames[i]);
g.drawImage(img,0,0,null);
}

Now I have two threads
one will update the images for every second
such that the updation will take place in a cycle ( only one file will be changed at a time..)
Another will call the repaint()

I can able to see that the images are updated by another thread but the updated images are not loaded by the applet insted the images that were present at the time of starting the applet is repeated.

How can i get the updated images into the Applet.

Thanks
Narayanaswamy