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
Explain an intermediate language?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
What do you mean by ternary operator in java?
What does yield method of the thread class do?
What is the difference between exception and error in java?
What is the difference between heap memory and stack memory?
What things should be kept in mind while creating your own exceptions in java?
What type of variable is error flag?
What are the differences between the constructors and methods?
What is broken and continue statement?
What is toarray method in java?
Explain about field hiding in java?
Why map is used in java?
Give example to differentiate between call by value and call by reference.
What is an abstract class and what is it’s purpose?