NumberFormat is currently a bit leniant. It will parse '123xx' but not 'xx123'. Folks using JFormattedTextField that want number parsing use NumberFormat. It's not expected that either string would be valid, instead both should throw an exception. Obviously we can't change this now, so perhaps we could add an option to turn on strict parsing.
- duplicates
-
JDK-6430420 Inconsistent JFormattedTextField behavior at FocusLost with Number value
-
- Closed
-
- relates to
-
JDK-5055568 SimpleDateFormat ("MM/dd/yyyy") accepts "05/21/2a00e" but not "05/2a/2004"
-
- Closed
-