Difference between the paint() and repaint() methods?
Answer Posted / ranganathkini
The paint method causes the component and and all its parts
to be painted on the Graphics context tat is passed in as
parameter.
If the component is a light-weight component, then a call to
the component's repaint method which invokes the paint
method as soon as possible. If the component is not a
light-weight component, then calling repaint is the same as
calling the update method.
| Is This Answer Correct ? | 19 Yes | 13 No |
Post New Answer View All Answers
Why use string handling in Java?
Why singleton is not thread safe?
Can we pass a primitive type by reference in java? How
What does the three dot emoji mean?
How to sort array in descending order in java?
How we can make copy of a java object?
What are the limitations of procedural programming approach?
What is casting in java programming?
What is the internal implementation of set in java?
What is a void in java?
What is the map interface in java programming?
What is protected access modifier?
How can we make sure main() is the last thread to finish in java program?
Can we overload the constructors?
What is arraylist e?