title: JScrollPane Not scrolling
body: <p>I'm printing a text that I scanned from a text file to a JPanel. The text is showing up, but it's not scrolling down. Any ideas? Here is my code:</p>
  
  <pre><code>rFrame = new JFrame();
  rFrame.setBounds(10, 10, 502, 502);
  rFrame.getContentPane().setLayout(null);
  
  
  JPanel pan = new JPanel();
  pan.setBackground(Color.WHITE);
  pan.setBounds(100, 100, 400, 400);
  rFrame.getContentPane().add(pan);
  pan.setEnabled(false);
  
  JScrollPane scrollBar=new JScrollPane(pan,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                                            JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);  
  
  rFrame.add(scrollBar);
  
  JTextArea area = new JTextArea();
  area.setText(printToFrame()); //Function prints from text file
  pan.add(area);
  rFrame.add(pan);
  
  rFrame.setVisible(true);
  rFrame.setLayout(new FlowLayout());
  rFrame.getContentPane().add(pan);
  rFrame.pack();
  
  ClientWindow window = new ClientWindow();
  window.rFrame.setVisible(true);
  </code></pre>