I have a JFormattedTextField which I want to accept numbers in the 5 digit range. The following code works correctly:
myNumberBox = new JFormattedTextField(N
You have to disable the grouping in your NumberFormat object like this:
NumberFormat format = NumberFormat.getIntegerInstance(); format.setGroupingUsed(false); myNumberBox = new JFormattedTextField(format);
See: NumberFormat.setGroupingUsed