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
How do you add an element to a set in java?
Is null or empty java?
What is finally and finalize in java?
What is keyword auto for?
What is the difference between replace and replace all?
What do you mean by chromounits in java8?
What does the “final” keyword mean in front of a variable? A method? A class?
Why does java have two ways to create child threads?
Is java still necessary?
How does class forname work in java?
Difference between keyword and identifier.
describe method overloading
What are different access specifiers in java? Explain
Java is pass by value or pass by reference? Explain
Is string is a class in java?