Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Strange behavior of the JFormattedTextField

 
Olena Golub
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I use JFormattedTextField for input the customer ID.

Everything works almost perfect. But I have a following problem:
I type e.g. some digits. Than I make the double click with the left mouse button inside of this field.
And the cursor jumps forward at some positions and left the empty spaces.
Is this a bug? Do you have any ideas how can I prevent it?
Thanks a lot!
Regards,
Olena
 
Olena Golub
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have changed to the TextField. Instead of JFormattedTextField I took JTextField.


And it works perfect!

But I am still interesting for the problem with JFormattedTextField.
Thanks a lot for your responses!
Olena
[ April 18, 2005: Message edited by: Olena Golub ]
 
Steven Bell
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a bit of a guess, but I have used some of the formatters a fair amount.

The MaskFormatter is just that, it puts a mask into the field. It has placeholder characters that fill in the field until the user puts in some value. You can specify the placeholder character, but I'm guessing the defualt is a space.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic