title: Removing a JComponent from a CardLayout
body: <p>How do I remove a <code>JPanel</code> (or any other <code>JComponent</code>) from a <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/awt/CardLayout.html" rel="nofollow noreferrer"><code>CardLayout</code></a>?
  I do not have direct access to the Component I want to remove, but I have the index (the one used to show the Panel, when we call <code>cardLayout.show(parentComponent, index);</code>).</p>