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 check if a number is a perfect square?
What is a protected method?
What is object english?
How will you load a specific locale?
What is an iterator java?
What is io stream in java?
Can we extend singleton class in java?
Can a abstract class be defined without any abstract methods?
What is currentthread()?
What is nested interface?
Explain working of call by reference function invoking.
What is private protected in java?
What is the purpose of static methods and static variables?
Name few java util classes introduced with java 8 ?
Is it possible to compare various strings with the help of == operator?