Discussion:
JFormattedTextField, NumberFormatter and null values
(too old to reply)
Stingray
2004-10-18 11:42:10 UTC
Permalink
Is there any way to extend JFormattedTextField dealig with numbers
using NumberFormatter?

I would like to allow a null value input.
It seems that the most of the functions used in NumberFormatter (for
example NumberFormatter.replase) is package friendly
and inmlementation in DefaultFormatter.DefaultDocumetFilter use package
friendly calls to JTextComponent and doesn't allow subclassing and
overwriting them.

Where the poin of intervention? May be somebody already implemented
something like this?

Please help!
Vladimir
Karsten Lentzsch
2004-10-18 13:22:20 UTC
Permalink
Post by Stingray
Is there any way to extend JFormattedTextField dealig with numbers
using NumberFormatter?
I wrap Formatters with an EmptyFormatter that has
an "empty value" that is used for blank strings.

The Validation Demo's last two pages demonstrate this
http://www.jgoodies.com/freeware/validationdemo/index.html

- Karsten

Loading...