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

1968


can i have the model papers for gate along with answers on my email id krish231191@gmail.com please???

1828


how to resize the components?

1828


Discussion Topic: “Statutory Defintions” Discussion Questions: Q1 Is it correct that a loan or an advance by a private limited company to a shareholder of the company is considered as payment of dividend? Explain your views. Q2 Will a loan or advance by a private limited company to its holding company be considered as payment of dividend if the subsidiary possesses sufficient amount of accumulated profits?

2360


c program to compare the initial portions of the two strings and return the matched portion if matches, otherwise return the empty string.

1742






.students decide to gift principal 4200 rupees. if teachers give 50% more than the students and an external person gives 3 times to that of teachers.how much do teachers give.

1838


why does find out power factor?

1444


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

1663


in which state of india has no panchayatraj

1353


please i need nautical science past question and answer

2368


what is the difference between interface and abstract class

1708


is vertical heat exchanger has better heat transfer coefficient than horizontal heat exchanger?

906


I am looking for bank exam coaching in Hyderabad. Can anybody tell me which is the best institute for BANK and which branch is good giving me branch details.

1788


used of viscocity in petrolium

2022


Respected sir/madam, My self R SANKAR. I am final year BE civil engineering student (2014-2018). i have shortlisted for isro exam 2018.last university exam (7th sem) result was declared i have scored 6.98CGPA. but they not provide last result mark sheet still now 1. What are the documents bring to isro exam venue? 2. either bring bonafide certificate from college instead of mark sheets?

840