title: Layouts and minimal sizes
body: <p>I'm trying to insert a new panel with a minimal size set onto an existing form. Unfortunately after I do this:</p>
  
  <pre><code>this.add(scrap);
  this.moveScrapCentre(scrap); // runs setLocation(...)
  this.revalidate();
  this.repaint();
  </code></pre>
  
  <p>(where <code>this</code>: JPanel with null layout, <code>scrap</code>: JPanel with box layout and children)</p>
  
  <p>the <code>scrap</code> gets resized to <code>(0,0)</code> - even though I set both minimal and preferred size in Netbeans' property editor. How can I prevent this, apart from forcing <code>scrap.setSize(scrap.getPreferredSize())</code>?</p>