Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
    Bookmark Topic Watch Topic
  • New Topic

How to make text field to accept only alphabets

 
Shrikanth Nekkanti
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have a First name Text field.I want to make this text field to accept only characters.
How to make this text field to restrict accepting numbers and special characters.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Report post to moderator
Assuming you're talking about a Swing application, have a look at this code example. It shows how to allow digits only. From that it should be easy to adapt it to your purposes.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator
Closing this duplicate post. Please continue discussion in the other thread.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!