textArea = new JTextArea(text.toString()); jScrollPane = new JScrollPane(textArea, JScrollPane.VERTICAL_SCROLLBAR_NEVER, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); getContentPane().add(jScrollPane); } public static void main(String args[]) { SwingUtilities.invokeLater(new Runnable() { @Override; There are no restrictions on allowed values, and the browser will automatically detect the correct file extension and add it to the file (.img, .pdf, .txt, .html, etc. This control enables the user to scroll the content by panning the viewport or by using scroll bars. how do i get rid of the vertical scrollbar in textarea? Download. 3 To Turn Off Automatically Hide Scroll Bars. Given an HTML document containing