Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding TextBox validation in Swing

 
Nodappa Hero
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have got a problem. I want user to be restricted for entering only numeric characters into the textbox. Any pointers on this.
Nodappa
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nodappa,
In case you haven't already seen it, I think the following section of the Java Tutorial is relevant:
http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html
And if you are using java version 1.4, then I think this (other) section of the Java Tutorial is also relevant:
http://java.sun.com/docs/books/tutorial/uiswing/components/formattedtextfield.html
Hope this helps.
Good Luck,
Avi.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic