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 thread scheduler schedule the task?
What is jagged array in java?
What type of variable is error flag?
What is class array in java?
What class allows you to read objects directly from a stream in java programming?
What is the purpose of assert keyword used in jdk1.4.x?
Can you declare a private method as static?
Does string is thread-safe in java?
What are three types of loops in java?
How do you allocate memory to object?
What are the methods used to implement for the key object in the hash map?
What is an infinite loop in java? Explain with an example.
What is command line argument
Explain about transient variables in java?
How do you check if a character in a string is a digit or letter?