Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with getCaretPosition  RSS feed

 
Lucas Pereira
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I�m trying to get the current input position of a TextBox. I tried to use the getCaretPosition() method, but this method is returning to me the final position of the string.

Example:
This is a simple text
^ -->Input Position (5) --> This is what I need.

but when this method runs, the input position goes to the end of the string

This is a simple text
^ This is what I get - the method the index of the end of the String

Thanks in Advanced
 
Rogerio Cardoso
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this same problem !
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!