Problems with Component Creation: Last-Minute Peer Creation
When AWT components are created, but not yet made visible, the associated peer resources are not allocated. When the component object is made visible, the peers are created ‘just-in-time’. (As a result, a component’s size is not valid until it is displayed.)
The same is found when a component is added to a non-visible container. When the contain is made visible, all its interior components get peer resources. This may cause sudden pauses when large containers become visible