Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cursor handling in JTextArea

 
kumar mars
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai
is there any way to dictate the movement of the cursor in JTextArea.
thanks in anticipation
bye
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a short program to show the use of the setCaretPosition() method of the JTextArea. This sets the position of the cursor (caret) in the JTextArea...

 
kumar mars
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it doesnt suffise setting cursor position in terms of index
i need some way to specify the position exactly in tersms of pixels or some thing of that kind
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic