title: What are side effects of setPreferredSize?
body: <p>I have window containing multiple panels. I don't have access to window code. (I can modify only panel’s code.)</p>
  
  <p>I removed few components from panel. Window has shrunk its size. But window is too small to display everything correctly.</p>
  
  <p>I added line <code>setPreferredSize(getPreferredSize());</code>. Now window have right size.</p>
  
  <p>What are side effects of setPreferredSize?</p>
  
  <p>Edit: BorderLayout is used. Which should ignore getXXXSize(). My panel is in CENTRE. Panel which doesn't fit the screen is on NORTH.</p>