I have the following Applet code to load an image.
public void init(){
str = "Hi, Welcome!";
sharedImage = getImage(getDocumentBase(), "/Users/Me/ScreenShare/testImage.png");
}
public void paint (Graphics g)
{
g.drawString(str, 50, 50);
g.drawImage(sharedImage, 100, 100, this);
}
But, I want to load this dynamically now, because the image from this path will be changing to new image every 5 seconds. How to refresh the image in Applet by itself if I do not use any html page to run the applet?
Please advise.