How to restrict Charachters in JTextbox
Posted on 2003-12-12
I cannot seem to find a way how to restrict the number of charachters in a JTextbox. I know that there is this Constructor where you can pass the COLUMN size but that doesnt work. Java 1.4 has this JFormattedTextbox where you can set the mask and specify something like "####" to restrict the entries to only 4 charachters, but that has a problem. By default it puts blanks in the textfield and that is a problem.