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 a finally block?
Explain about collection interface in java?
What is java object name?
What is oop in java?
Differentiate between postfix and prefix operators in java.
What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?
What is replacefirst in java?
Which collection does not allow duplicates in java?
What is prefix of a string?
what is synchronization and why is it important? : Java thread
What is keyword and identifier?
Explain some best practices you would apply while using collection in java?
Can a list be null in java?
'A class is a template for an object' explain this statement.
What is a map in java?