How do I set a JTextField to accept only certain foreign characters?
843806Aug 5 2008 — edited Aug 6 2008Hi, this is my first post. forgive me if the answer is too obvious:
I have two JTextFields in a frame. One must accept only Russian Cyrillic characters. The other accepts whatever keyboard the user happens to use normally.
As things stand, I need to change the keyboard manually to allow the Cyrillic, then change it back for the English. I simply want it that if the flashing cursor is focused in the Russian JTextField, the keyboard automatically switches to Cyrillic. And in all other cases it stays as the user's default (eg English).
Perhaps the question is too trivial, perhaps the answer is obvious, perhaps it has something to do with LocaleS. I've tried the latter without success. Hoppe someone can help.