title: JSplitPane: is there a way to show/hide one of the panes?
body: <p>I have a JSplitPane with two components, A and B, but sometimes I want to be able to hide B, so that either of the following are true:</p>
  
  <ul>
  <li>components A and B are visible in the JSplitPane</li>
  <li>only component A is visible in the space occupied by the JSplitPane</li>
  </ul>
  
  <p>Is there a way to do this?</p>