title: Swing method to show or hide part of a panel on button click?
body: <p>I'd like to be able to show and hide (and therefore grow and shrink the jpanel as appropriate) in my swing application. I've seen something similar on websites that I imagine uses JS and JQuery.</p>
  
  <p>What I'm after is the ability to click a button (that might say 'Advanced options') that then 'slowly' grows the panel and reveals (<code>setVisible(true)</code>) components.</p>
  
  <p>Is this possible using Swing? I've tried looking round the web, and SO but I only seem to get JQuery questions, or unhelpful Java posts. <a href="https://stackoverflow.com/questions/4793674/hide-show-part-of-the-window-with-a-button-click">This</a> is the closest I've found.</p>