Answer Posted / mayank
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.
}
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
What is an inner class in java?
What is javac in java?
Explain the difference between map and flatmap stream operation?
How to make a non daemon thread as daemon?
Can set contain duplicates?
What are scriptlets?
What is a control variable example?
What are the different tags provided in jstl?
What is a local block?
What is a void in java?
What do you understand by the term wrapper classes?
What is Recursion Function?
What is the difference between a vector & an array list?
What do you understand by the term polymorphism?
Is java a pure object oriented language?