Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / October 2004

Tip: Looking for answers? Try searching our database.

JFormattedTextField,  NumberFormatter and null values

Thread view: 
Stingray - 18 Oct 2004 12:42 GMT
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 - 18 Oct 2004 14:22 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.