• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

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