T
tereferekuku
Hi,
I've got JFormattedTextField instantiated with RegexFormatter (a class
which does input verification basing on regular expression I supply).
It works fine except for one thing: verification happens after I
remove focus from JTextField instance, and I'd like to have on the
flight verification - happening while an user types consecutive
characters.
For example I have regex recognizing integers; if I type in "12A3" and
remove focus it will reject the input, but I want to have "123"
instead - so that "A" gets ignored.
I also tried to override keyPressed method from KeyListener, but
without success.
Any ideas?
Rgds,
Arek
I've got JFormattedTextField instantiated with RegexFormatter (a class
which does input verification basing on regular expression I supply).
It works fine except for one thing: verification happens after I
remove focus from JTextField instance, and I'd like to have on the
flight verification - happening while an user types consecutive
characters.
For example I have regex recognizing integers; if I type in "12A3" and
remove focus it will reject the input, but I want to have "123"
instead - so that "A" gets ignored.
I also tried to override keyPressed method from KeyListener, but
without success.
Any ideas?
Rgds,
Arek