Assuming that you're using JTextArea, the cursor is actually a caret, and can be set with setCaret(). Unfortunately, that takes a position, not a line number as a parameter. However, you should be able to use getLineEndOffset(), and a little bit of logic to accomplish your goal.
Joined: Oct 27, 2002
I am using AWT and not Swings. Thanks. [ January 15, 2003: Message edited by: Srinivas Nagesh ]