title: Adding ScrollPane to JTextArea
body: <p>I am working on a project for my college course. I was just wondering if anyone knew how to add a scrollBar to a JTextArea. At present I have the GUI laid out correctly, the only thing missing is the scroll bar.</p>
  
  <p>This is what the GUI looks like. As you can see on the second TextArea I would like to add the Scrollbar.</p>
  
  <p><img src="https://i.stack.imgur.com/JNy1B.png" alt="GUI"></p>
  
  <p>This is my code where I create the pane. But nothing seems to happen... t2 is the JTextArea I want to add it to.</p>
  
  <pre><code>scroll = new JScrollPane(t2);
      scroll.setBounds(10,60,780,500);
      scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
  </code></pre>
  
  <p>Any help would be great, thanks!</p>