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 / General / August 2006

Tip: Looking for answers? Try searching our database.

MaskedFormatter help

Thread view: 
sasquatch - 03 Aug 2006 21:40 GMT
I am trying to use a MaskedFormatter in a JFormattedTextField to
disallow the user from entering anything but a number less than 4
digits long. To allow a 3 digit number, I can use "###" for the mask,
but how do I allow 3, 2 and 1 digit numbers? I.e. how do I make a mask
that allows *upto* 3 digits instead of exactly 3 digits?

Sasquatch
Knute Johnson - 03 Aug 2006 23:19 GMT
> I am trying to use a MaskedFormatter in a JFormattedTextField to
> disallow the user from entering anything but a number less than 4
[quoted text clipped - 3 lines]
>
> Sasquatch

I don't think you can that way.  Use an InputVerifier to limit a range
of numbers.

Signature

Knute Johnson
email s/nospam/knute/



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.