Originally posted by H Melua:
it resets the fields to display nothing,
How are you doing this?
It sounds like you may be doing something like setText(""), which
will clear the field visually but not change the result of getValue().
i do the same again but this time i decide not to enter data in bField (although i jumped to it using the tab button after aField)... what bugs me is that after i leave the bField (using the Tab button again) it displays the previous value i have entered in that field!! Now i want it to just leave it blank the way it is!!
Perhaps
setFocusLostBehavior(JFormattedTextField.COMMIT) would be closer to what you want. Set that way, when the field loses
focus with displayed text that is invalid, the invalid text will remain but
getValue() will continue to return the last valid value.
The default is COMMIT_OR_REVERT, which replaces the displayed text
with that of the last valid value. This would seem to be what you are
complaining about.
[ November 14, 2007: Message edited by: Brian Cole ]