Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Remove Line from JTextArea

807589Oct 3 2008 — edited Oct 4 2008
Ok, this is probably a stupid question, but I have a JTextArea and it sends a message when I click enter. However when I click enter it goes onto the next line. How do i get the cursor to go back to the begging of the text area (first line).

I have been looking at the API and documentation. I have used 'setCaretPosition(0)' and this does not seem to do what I want. Any suggestions appreciated.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 1 2008
Added on Oct 3 2008
7 comments
1,824 views