• Post Reply Bookmark Topic Watch Topic
  • New Topic

validate jTextField in java swing

 
vijayakumar durai
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any body tell how to validate jtextfield in java swing whether user given the value or not for phone number allow only number?
 
Rob Camick
Ranch Hand
Posts: 2701
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The numeric text field link is old.

These days you would either use a JFormattedTextField or you would use a DocumentFilter.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!