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


Please Help Members By Posting Answers For Below Questions

What is final method in java?

535


How are variables stored?

527


How does java pattern compile work?

536


How do you sort arrays in java?

517


How is final different from finally and finalize?

488






What is the loop in java?

564


What is difference between local variable and global variable?

467


Can we have more than one package statement in source file ?

580


What is the difference between Java1.4 and Java1.5

1821


What is array length?

498


What happens if main method is not static?

489


Do I need java on my computer?

522


How do you create an array in java?

523


What are different types of references?

524


What is a parameter in matrices?

539