Validates this container and all of its subcomponents.
The validate
method is used to cause a container to lay out its subcomponents again. It should be invoked when this container's subcomponents are modified (added to or removed from the container, or layout-related information changed) after the container has been displayed.
If this {@code Container} is not valid, this method invokesthe {@code validateTree} method and marks this {@code Container}as valid. Otherwise, no action is performed.
@see #add(java.awt.Component)
@see Component#invalidate
@see javax.swing.JComponent#revalidate()
@see #validateTree