I have a JTextArea which is receiving text from files and then being displayed on a dialog box. Because the text is long, I have added a JScrollPane. So far so good. However, the vertical scroll bar is always at the bottom of the text not at the top, which is where you would expect it. So, how can I code it to go back to the top after the text has been added? Any ideas??