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

setCaretPosition, jformattedtextfiend and maskformatter  RSS feed

 
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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!