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 the output of the below java program?
Is it possible to compare various strings with the help of == operator? What are the risks involved?
what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread
Using callable statement how can you pass out parameters, explain with example?
How does the java compiler work?
how we can create packages in java?
Can we define package statement after import statement in java?
What is the base class of all exception classes?
Why put method is idempotent?
Can we use a default constructor of a class even if an explicit constructor is defined?
What are runtime exceptions?
Can we convert stringbuilder to string in java?
Can you explain the cs option of java interpreter?
What is core java used for?
Discuss about garbage collector in Java.