I\'m using JScrollPane to allow scrolling in a JFrame that has a text component that\'s serving as a text editor. What I want to do, after setting the text in this editor,
Here's how:
textArea.setSelectionStart(0); textArea.setSelectionEnd(0);