title: JScrollpane scrollbar resizing issue
body: <p>I have the following problem:</p>
  
  <p>I have JScrollPane containing an image.</p>
  
  <p>The scrollpane is inside a JPanel together with other components in order to be able to layout the whole thing with a BorderLayout (the scrollpane is the CENTER and I have something in the SOUTH). </p>
  
  <p>This JPanel is in a JSplitPane.</p>
  
  <p>The JSplitPane is finally inside a JFrame.</p>
  
  <pre><code>JFrame
  {
   JSplitpane
   {
    JPanel(BorderLayout)
    {
     JScrollPane(CENTER)
     {
      BufferedImage
     }
  
     JPanel(SOUTH)
     {...}
    }
   }
  }
  </code></pre>
  
  <p>My problem now is that when I resize my frame the image in the scrollPane resizes fine until it reaches the images size. Then the image is stretched which I want to prevent.
  I tried wrapping the JScrollPane in a JPanel that is layout with a FlowLayout. That works fine for the resizing bit but the scrollbars disappear once I resize the frame.</p>
  
  <p>I overrode the scrollPane's setSize() method and found out that the size of the scrollpane is always set to the image's size once the frame is resized. I don't have a clue how to fix that though.</p>
  
  <p>Every hint is appreciated.</p>
  
  <p>Cheers,</p>
  
  <p>Ben</p>