?
Solved

How to apply numeric validation in java core.

Posted on 2013-06-10
3
Medium Priority
?
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 19

Accepted Solution

by:
mrwad99 earned 1500 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month9 days, 5 hours left to enroll

764 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