title: JScrollPane not scrolling when a JPanel is added
body: <p>I was hoping someone would be able to help. This seems like it should be a simple problem but for the life of me I can't work it out.</p>
  
  <p>Problem: I am creating a <code>JPanel</code> that is made up of panels containing 5 labels each with <code>ImageIcons</code>. [sounds confusing]</p>
  
  <p>I am then adding this panel to a <code>JScrollPane</code>. But when it is displayed the images are showing and correctly placed but I am unable to scroll down to see the panels that are off the screen.</p>
  
  <p>here is a screenshot: <a href="http://img841.imageshack.us/img841/36/screenshot20120510at160.png" rel="nofollow">http://img841.imageshack.us/img841/36/screenshot20120510at160.png</a></p>
  
  <p>Here is the snippet of code I am using to populate the panels and add the <code>JScrollPane</code>.</p>
  
  <pre><code>private void setSeriesViewContainer(){
      container = new BackgroundPanel(backGround, BackgroundPanel.TILED);
      //container.setPreferredSize(new Dimension(650,500));
      container.setLayout(new BoxLayout(container, BoxLayout.PAGE_AXIS));
      FlowLayout flowLayout = new FlowLayout();
      JPanel[] jp = new BackgroundPanel[10];
          for (int i = 0; i &lt; jp.length; i++) {
          jp[i] = new BackgroundPanel(backGround, BackgroundPanel.TILED);
          jp[i].setLayout(flowLayout);
              for (int j = 0; j &lt; 10; j++) {
                  jp[i].add(new JLabel(new         ImageIcon(getClass().getResource("/placeHolder.png"))));
  
              }
  
      }
          for (int i = 0; i &lt; jp.length; i++) {
          container.add(jp[i]);
  
      }
  public void init(){
  seriesViewContainer = new javax.swing.JScrollPane(container);
  seriesViewContainer.setBorder(null);
           seriesViewContainer.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
      seriesViewContainer.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
      seriesViewContainer.setPreferredSize(new java.awt.Dimension(700, 300));}
  </code></pre>
  
  <p>I have searched around for the solution but have not come up with one as yet. </p>