I have a JTextField for users to enter a serial number. The form of the serial number is such that it does not contain the letters I, O, or S, since they look like 1, 0, and 5. What is the correct way to make sure that if the user enters one of these letters, he enters a number instead?
for example, the User enters AaOo0and switches to JTextField as Aa000
To clarify this, this should happen when the user types each character, and not after he has finished typing and left the text box.
source
share