Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

When is update method called ?
The update() method is defined by the AWT and is 
called when your applet has requested that a 
portion of its window be redrawn. The problem is 
that the default version of update() first fills 
an applet with the default background colour and 
then calls paint(). You can override the update() 
method. The paint() in this case will simply call 
update().  

public void update(Graphic g) {
     //Redisplay your window here.
}

public void paint(Graphics g) {
     update(g); // call to the update()method.
}
Posted By: Name:Rajesh Kr URL: When is update method called ?