• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

How to apply numeric validation in java core.

I have an windows frame, with TextField tf=new TextField("",30);

I want that the usershould be able to type only numbers there.
0
searchsanjaysharma
Asked:
searchsanjaysharma
1 Solution
 
mrwad99Commented:
This is quite a common question.  The best answer I have seen is actually a video: check it out at http://www.youtube.com/watch?v=9B5ZgItFxNA

HTH
0
 
ksivananthCommented:
check JFormattedTextField, e.g.,

numberField = new JFormattedTextField(NumberFormat.getInstance());
0
 
searchsanjaysharmaAuthor Commented:
tx
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now