code: public void setContentPane(Container contentPanel) {
          if (contentPanel == null) {
              throw new IllegalArgumentException("Content pane can't be null");
          }
  
          if (wrapper != null) {
              super.remove(wrapper);
          }
          wrapper = new WrapperContainer(contentPanel);
          super.addImpl(wrapper, BorderLayout.CENTER, -1);
      }
docs: Sets the content pane of this JCollapsiblePane. Components must be added
  to this content pane, not to the JCollapsiblePane.
  
  @param contentPanel
  @throws IllegalArgumentException if contentPanel is null