• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to restrict user from typing only english alphabet in java combobox

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,
I am stuck with a problem and i want user can type only english alphabet in editable jcombobox. I know how to limit its length and ignore digits in it. But how can i limit user from typing special chars like @,# $%^^&*()!~~
Please help me..i will be highly thankful to you
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ankush Seth wrote:Hello all,
I am stuck with a problem and i want user can type only english alphabet in editable jcombobox. I know how to limit its length and ignore digits in it. But how can i limit user from typing special chars like @,# $%^^&*()!~~
Please help me..i will be highly thankful to you



There are many ways. You know for sure is that the english alphabets are from A to Z. You could write a regex to match only characters between A and Z and if not then throw an error. I'm not sure if there is a Java Swing (assuming that you are using Java Swing) library that does this for you.
 
Ankush Seth
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok thank you........very much ....actually my mind stopped working thats why i need your help! Thank you very much!
 
reply
    Bookmark Topic Watch Topic
  • New Topic