title: Java Textarea ScrollPane
body: <p>I have created a textarea, and i need a scrollbar applied to the textarea when necessary (when the text gets too long down and it cant be read anymore).</p>
  
  <p>this is the code i have written, but for some reason, the scrollbar doesnt really come up?</p>
  
  <pre><code>    final JTextArea textArea = new JTextArea();
      textArea.setEditable(false);
      textArea.setBounds(10, 152, 456, 255);
      textArea.setBorder(border);
      textArea.setLineWrap(true);
      sbrText = new JScrollPane(textArea);
      sbrText.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
      panel_1.add(textArea);
  </code></pre>