aspose file tools*
The moose likes Beginning Java and the fly likes accepting only numbers in a text field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "accepting only numbers in a text field" Watch "accepting only numbers in a text field" New topic
Author

accepting only numbers in a text field

vinod kumar
Greenhorn

Joined: Jan 24, 2005
Posts: 15
hai all
I want a text field(jformattedtextfield) which accepts only numbers.It should not even display the other characters.That is here i am not interested in focus listener.Is there any method by which on enter(key press) itself the validation can be done so that other nonintegers are not typed(not accepted by the text field).
Vijay Vaddem
Ranch Hand

Joined: Feb 13, 2004
Posts: 243
Check this....
vinod kumar
Greenhorn

Joined: Jan 24, 2005
Posts: 15
thank u
it is working now.....
 
wood burning stoves
 
subject: accepting only numbers in a text field