java.​awt.​Container.add() … validate()!

java.​awt.​Container:

public Component add(Component comp)
Appends the specified component to the end of this container. This is a convenience method for Container.addImpl.

Note: 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.

Kommentieren