title: Swing refresh cycle
body: <p>I'm trying to understand when to use revalidate/repaint/pack.</p>
  
  <p>Surprisingly I haven't found much detailed under-the-hood documentation (feel free to link).</p>
  
  <p>So far I have understood that this is all the responsibility of the RepaintManager. </p>
  
  <ul>
  <li>paint/repaint refer to what  sees as dirty/clean</li>
  <li>pack/validate/revalidate refer to what is valid</li>
  </ul>
  
  <p><a href="http://www.oracle.com/technetwork/java/painting-140037.html#swing" rel="noreferrer">This article on Oracle</a> explains that calling a repaint enqueues a job on the Event Dispatcher Thread that will in turn call paintImmediately() on the component (this redraws the component).</p>
  
  <p><a href="http://docs.oracle.com/javase/tutorial/uiswing/layout/howLayoutWorks.html" rel="noreferrer">This trail</a> indicates that to be or not to be valid is associated with the LayoutManager. And that this is all about the size of the component rather than the content.</p>
  
  <ol>
  <li>Is it true that you should call revalidate when you move/resize your component and repaint when you change it's contents?  </li>
  <li>Is the pack() method really a deprecated thing that you should never call?</li>
  <li>Are any of the above claims wrong?</li>
  </ol>