Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

select a row inJTextArea using CaretPosition

 
akila kann
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to select a entire row in JTextArea using the Caret Position?.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using JDK1.3 you can use the setSelectionStart(int) and setSelectionEnd(int) methods. Course you would need to know the Caret Positions that correspond to those.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic