doLayout()
call the LayoutManager of the Container that holds the Component on which this message was sent, to layout the Component. Normal programs should not call it directly because it is called when the Container receives the validate message.
validate() mainly intended to be invoked over Containers. Call doLayout on the Components contained by the Container.
pack() on a Container links the Container to its peer. The peer is the native resource for representation on the screen. It does the same to the Components holded by the Container. Also set the sizes to the natural ones. That is those returned by getPreferredSize method. But the size is subjected to LayoutManger oversight.
A Window needs either pack or setSize, after that show or setVisible. The last two also links the
Java objects to their peers (as pack does) but they don't set the size.
I have read that setSize, setBounds and setLocation, for Components contained by a Container, only work if the LayoutManager is null.
Calling repaint shedules a call to upgrade in the AWT Painting-Event
thread. There is only a thread dedicated to these tasks because otherwise the painting of a Component could be interrupted, and it could be left unfinished. The default implementation for upgrade just clean the Component drawing area and call paint. This method lastly paints the Component.
Any corrections are wellcomed