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 does @override mean?
Write a program in java to establish a connection between client and server?
What is object of class in java?
What is the use of beaninfo?
How do you delete a list in java?
Can we override a variable in java?
What is difference between c++ and java ?
What is a boolean output?
What are the library functions in java?
How do you read and print a string in java?
Which is faster string or stringbuilder?
What is the difference between java applets and applications?
What is thread count in java?
What is java literals?
How to display arraylist values in java?