• Post Reply Bookmark Topic Watch Topic
  • New Topic

setCaretPosition, jformattedtextfiend and maskformatter

 
mark smith
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i have a JFormattedTextField and added to it a MaskFormatter

when this component get the focus, i would like to set the cursor to the second character

my code



when the component get the focus, nothing happen... setCaretPosition don't seem to work...

any idea?
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!