title: Automatic content resizing of JLayeredPane
body: <p>I'm trying to create an app with a <code>JLayeredPane</code> that scales automatically with the size of the parent <code>JFrame</code> (this is the easy part using <code>BorderLayout</code> as layout manager on the frame's content pane). The hard part is the fact that I want the content of the <code>JLayeredPane</code> to automatically resize with the <code>JLayeredPane</code> (and thus the <code>JFrame</code> too).</p>
  
  <p>In fact the functionality I want to achieve is a lot like the dockable console in Netbeans, that just like comes "on top" of the editor when clicked, and when dismissed hides again and docks into the "console" word in the status bar. Obviously I also want resizing behavior to work correctly. What would be the best way to achieve this (if not with <code>JLayeredPane</code>)?</p>