MaskFormatter formatter = new MaskFormatter("*****");
jtxtSellingPrice.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(formatter));
formatter.setValidCharacters("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ $#@!&*()");
Character |
Description
|
---|---|
# | Any valid number, uses Character.isDigit . |
' | Escape character, used to escape any of the special formatting characters. |
U | Any character (Character.isLetter ). All
lowercase letters are mapped to upper case. |
L | Any character (Character.isLetter ). All
upper case letters are mapped to lower case. |
A | Any character or number (Character.isLetter
or Character.isDigit ) |
? | Any character
(Character.isLetter ). |
* | Anything. |
H | Any hex character (0-9, a-f or A-F). |
No comments:
Post a Comment