Whenever I remove and add swing components from say JPanel, shall I perform call on validate or revalidate?
revalidate() would be better. revalidate() marks all the container upto the top level as not proper or not valid. Then it calls validate() on the top level. The validate() method of the parent checks if at least one of its immediate children is signaled invalid or improper. it calls validate of the parent. so calling revalidate() automatically means calling validate().
1.4m articles
1.4m replys
5 comments
56.9k users