title: setSize() v/s setPreferredSize() and pack()
body: <p>I am not clear about what is the difference between <code>setSize()</code> and <code>setPreferredSize()</code>.
  what would happen if i use <code>setSize()</code> instead of <code>setPreferredSize()</code>.</p>
  
  <hr>
  
  <p>And what exactly does <code>pack()</code> method do ?</p>