Why is this happening,and what can I do if I want the components to appear immediately?
Just in case, i'd also check that everything else is in order - components could also disappear due to not having enough area to display (on some layouts), badly written custom layout managers, misuse of threads, etc.
The java 5 API does mention it explicity:
If a component has been added to a container that has been displayed, validate must be called on that container to display the new component. If multiple components are being added, you can improve efficiency by calling validate only once, after all the components have been added.
Thus, it *might* involve performance: adding a component requires to re-calculate the container's layout and repaint, but perhaps they didn't want to build it inherently into 'add()' method because it's inefficient for 'bulk' adding. And until validation, they might have preferred to hide the container rather then show invalid info.
Note it's just a guess - I hope your post gets additional replies .
[ March 15, 2007: Message edited by: Sol Mam-Orn ]