From JavaDoc:
public void validate() Validates this container and all of its subcomponents. Validating a container means laying out its s
public void validate()
Validates this container and all of its subcomponents. Validating a container means laying out its s
To add up to what has been said in the answers, don't forget to override getPreferedSize() method to return your component preferred size. Otherwise the layout manager won't position your JComponent hence will not be displayed.
getPreferedSize()
JComponent