Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to Validate Text field in java swing,It should accept only numric value

843804Jan 12 2005 — edited May 10 2005
Hi There!
can any budy help me out in writing method where in text field should accept numric value & validation should be like this.

The number is between 1 and 12 digits in length
The number is all digits (i.e. contains no alpha characters)
The number is not all zeros
If the number is 7 or more digits in length then
---The number cannot be all the same digit
--The number cannot be a sequence where zero is in sequence with both 1 and 9


Thanks in Advanced
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 7 2005
Added on Jan 12 2005
11 comments
311 views