This is probably a quick win for someone very familiar with the Java Swing API. I was looking at the Container documentation here, and I got a feel that the invalidate() and validate() methods are somewhat like a constructor and destructor helper methods (if you are to use a C++ analogy). invalidate() seems like it is used to do cleanup stuff (setting your member variables to null, closing your clients, etc.) while validate() is called before creating a component.
My question: When should one leverage these two methods? What would be a really good example of the need to drive the necessity to override one/both of these methods?
Any/all help is welcome. Thank you!