code: public void removeFromAccordion(JComponent component) 
      {
          CollapsiblePanel collapsiblePanel = collapsiblePanels.get(component);
          if (collapsiblePanel != null)
          {
              contentPanel.remove(collapsiblePanel);
              collapsiblePanels.remove(component);
              revalidate();
          }
      }
docs: Remove the given component from this accordion
  
  @param component The component to remove