public void setContentPane (Container content)

Sets the content pane -- the container that holds the components parented by the root pane.

Swing's painting architecture requires an opaque JComponent in the containment hierarchy. This is typically provided by the content pane. If you replace the content pane it is recommended you replace it with an opaque JComponent.

Parameters:
content    the Container to use for component-contents

Exceptions:
java.awt.IllegalComponentStateException    (a runtime exception) if the content pane parameter is null