1 <p>(<a href="http://java.sun.com/developer/JDCTechTips/2003/tt1208.html#1">From JDC Tech Tip</a>): The Swing methods
2 show(), setVisible(), and pack() will create the associated peer for the frame.
3 With the creation of the peer, the system creates the event dispatch thread.
4 This makes things problematic because the event dispatch thread could be notifying
5 listeners while pack and validate are still processing. This situation could result in
6 two threads going through the Swing component-based GUI -- it's a serious flaw that
7 could result in deadlocks or other related threading issues. A pack call causes
8 components to be realized. As they are being realized (that is, not necessarily
9 visible), they could trigger listener notification on the event dispatch thread.</p>