title: How to implement accordions in Java swing
body: <p>I have implemented accordions in Java using the code from 
  <a href="https://code.google.com/p/k-diapo/source/browse/trunk/kdiapo/src/View/AccordianPanel.java?r=17" rel="nofollow noreferrer">https://code.google.com/p/k-diapo/source/browse/trunk/kdiapo/src/View/AccordianPanel.java?r=17</a></p>
  
  <p>But to this I have panels which I have designed which is in Null layout, when I inserted these panels into accordions it is fine but, when I re-size the frame, contents not getting re-sized in it. </p>
  
  <p>This accordion I have place using grid-bag layout. Whole idea is to get re-size the components as window re-sized.</p>
  
  <p>How can this be achieved?</p>