senskart 0 Newbie Poster
Recommended Answers
Jump to Postwith a key listener, for instance. you add a key listener that checks the input given, if it's not a number or a ., have it consume the event.
Jump to PostUse a JFormattedTextField.
See http://docs.oracle.com/javase/tutorial/uiswing/components/formattedtextfield.html
All 5 Replies
senskart 0 Newbie Poster
stultuske 1,116 Posting Maven Featured Poster
Traevel 216 Light Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.