0

I am trying to display an Image using applet. Image is updated after every 4 seconds so i want my applet to show updated image.I am not sure where
i should load the image i have tried to load it in the init() method as well as in "start" method but it didnt workd out for me.Can anybody please help me with this

1
Contributor
1
Reply
2
Views
9 Years
Discussion Span
Last Post by staneja
0

Hi , I added the follwing code in my applet and it solved my problem

try{ 
    // Step 1: get a Runtime object 
    Runtime r = Runtime.getRuntime(); 
    r.gc(); 
    Thread.sleep(1);

    }catch(InterruptedException xx){ xx.getMessage(); };


}

Edited by Reverend Jim: Fixed formatting

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.