 <p>It's a hack, but the best way I could find (without using ugly <code>ScrollPaneManager</code>s) was to implement a <code>ComponentListener</code> on the <code>JScrollPane</code> to resize the child component whenever it was resized.</p> <pre><code>jsp.addComponentListener(new ComponentListener() { @Override public void componentShown(ComponentEvent e) {} @Override public void componentResized(ComponentEvent e) { Dimension jspSize = ((JScrollPane)e.getComponent()).getViewport().getSize(); jep.setBounds(0, 0, jspSize.width, jspSize.height); } @Override public void componentMoved(ComponentEvent e) {} @Override public void componentHidden(ComponentEvent e) {} }); </code></pre>