title: how to add scrollbar to textarea in java
body: <p>the jscrollpane that I am adding doesnt appearin my textarea</p>
  
  <pre><code>textArea = new JTextArea();
   scroll = new JScrollPane(textArea);
            scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
  
           this.add(textArea);
           this.add(scroll);
  
            this.setSize(1000, 600);
         this.setLayout(new BorderLayout());
  
  
          setVisible(true);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setLocationRelativeTo(null);
  </code></pre>