How do I get the pane to display scrolled to the top. This is what I'm trying but its not working... JScrollPane scrollPane = new JScrollPane(textArea); scrollPane.getVerticalScrollBar().setValue(0); // this doesn't work getContentPane().add(scrollPane, BorderLayout.CENTER); 1  Back to top.