Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

validate jTextField in java swing  RSS feed

 
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: 2787
12
  • 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!