what does JComponent.invalidate()or JComponent.invalidate()do?

Answer Posted / bombe swapnil

Invalidate()
This method makes components invalid , along with all of its
ancestor containers up to the
nearest validate root. Validate root can be any container
which doesn’t change the size when their child components
change size. This method need to call when components needs
to have new layout to be done.

Revalidate()
When we call invalidate() it doesn’t automatically calls
validate to make Components to be valid again. Revalidates
calls invalidate first and then make components valid by
calling validate method. Most swing components calls
revalidate() method when we change the size of the
components and call the repaint method.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can some1 please mail me the question papers of iiit hyderabad...my mail id is cenablogspot@gmail.com

2101


Equivalent resistance of 100 homs and 200 homs resistors connected in parallel is

1337


why does find out power factor?

1447


i have M.TECH interview on RF AND MICROWAVE ENGINEERING IN IIT (KHARAGPUR/ROORKEE).KINDELY TELL WHAT SUBJECTS SHOULD I READ AND WHAT ARE THE INTERVIEW QUESTIONS.

6228


used of viscocity in petrolium

2027






sir , please send me previous gate ece questionpapers with explanations.i want 15 years of gate ece question papers

1765


WHO IS INVITED WIRELESS FIDELITY TECHNOLOGY

1802


the servents of india society was founded by ?

1588


richman keeps in pocket poor man throws and kids eat me am an english word P-U--E--L

2062


22. A solution of 1% (w/v) starch at pH 6.7 is digested by 15 μg of β‐amylase (mol wt 152,000). The rate of maltose (mol wt = 342) had a maximal initial velocity of 8.5 mg formed per min. The turnover number is

5977


Why voltage drops in star connected motor And how IL=ph

1322


Can some1 please mail me the question papers of iiit hyderabad...my mail id is cenablogspot@gmail.com

1970


plz send me bhel paper....

1769


Sir Pl Provide the diploma nautical science sample paper

2073


please send me NTPC previous papers on my email ID 18amarjeet.civil@gmail.com or mr.yadav143@gmail.com

1663