• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable-MaskFormatter

 
Vege Thokr
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm doing B&S Assignment. My JTable has a column that can take only 0-9. I'm using a customized cell editor, which is basically a formatted text field (MaskFormatter).
The problem is getValue() returns null, while getText() returns the entered value. Precisely it fails during commitEdit() with ParseException.
I saw one example in Java Tutorial where for a mask formatter they were using getText() directly instead of getValue().
Is it right doing this way or could I be missing something?

Thanks
Vege Thokr
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic