Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic


Vege Thokr
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Vege Thokr
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!