 <p>I think that in official tutorial about <a href="http://download.oracle.com/javase/tutorial/uiswing/components/textarea.html">JTextArea</a> and <a href="http://download.oracle.com/javase/tutorial/uiswing/components/scrollpane.html">JScrollPane</a> is described everything about that, another examples <a href="http://www.java2s.com/Tutorial/Java/0240__Swing/0800__JScrollPane.htm">here</a> and <a href="http://www.java2s.com/Tutorial/Java/0240__Swing/0280__JTextArea.htm">here</a> </p> <pre><code>mySchroll = new JScrollPane(myTextArea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); </code></pre>