Solved

How to apply numeric validation in java core.

Posted on 2013-06-10
3
217 Views
Last Modified: 2013-06-10
I have an windows frame, with TextField tf=new TextField("",30);

I want that the usershould be able to type only numbers there.
0
Comment
Question by:searchsanjaysharma
3 Comments
 
LVL 19

Accepted Solution

by:
mrwad99 earned 500 total points
ID: 39234344
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
 
LVL 26

Expert Comment

by:ksivananth
ID: 39234363
check JFormattedTextField, e.g.,

numberField = new JFormattedTextField(NumberFormat.getInstance());
0
 

Author Closing Comment

by:searchsanjaysharma
ID: 39235413
tx
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now