-
Bug
-
Resolution: Fixed
-
P4
-
6
-
b03
-
x86
-
windows_xp
A DESCRIPTION OF THE PROBLEM :
In Javadoc for class is this example:
MaskFormatter formatter = new MaskFormatter("###-####");
formatter.setPlaceholderCharacter('_');
formatter.getDisplayValue(tf, "123");
But MaskFormatter doesn't have getDisplayValue().
I check it also in Java 5, here is this bug too.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
corect example
ACTUAL -
When initially formatting a value if the length of the string is less than the length of the mask, two things can happen. Either the placeholder string will be used, or the placeholder character will be used. Precedence is given to the placeholder string. For example:
MaskFormatter formatter = new MaskFormatter("###-####");
formatter.setPlaceholderCharacter('_');
formatter.getDisplayValue(tf, "123");
URL OF FAULTY DOCUMENTATION :
http://download.java.net/jdk6/docs/api/javax/swing/text/MaskFormatter.html
In Javadoc for class is this example:
MaskFormatter formatter = new MaskFormatter("###-####");
formatter.setPlaceholderCharacter('_');
formatter.getDisplayValue(tf, "123");
But MaskFormatter doesn't have getDisplayValue().
I check it also in Java 5, here is this bug too.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
corect example
ACTUAL -
When initially formatting a value if the length of the string is less than the length of the mask, two things can happen. Either the placeholder string will be used, or the placeholder character will be used. Precedence is given to the placeholder string. For example:
MaskFormatter formatter = new MaskFormatter("###-####");
formatter.setPlaceholderCharacter('_');
formatter.getDisplayValue(tf, "123");
URL OF FAULTY DOCUMENTATION :
http://download.java.net/jdk6/docs/api/javax/swing/text/MaskFormatter.html