I need to edit format for JFormatedTextField in a Java program. NetBeans are “helping” me with something called Format editor. But, I have no clue how the pattern works.

For #,##0.### , it returns 1,234.567, as pictured above. However, I want to change the thousands delimiter to space and decimal separator to comma.
I would guess # ##0,### is the right format, but no, that returns “Malformed pattern # ##0,###”.
How can I change the thousand separator to space and decimal to comma? Is that even possible, using Format editor?
It sounds like you’re looking for the reference for the
java.text.NumberFormatclass.The
DecimalFormatSymbols.getGroupingSeparatormethod looks like it is probably relevant to what you’re doing. You will have to choose an appropriateLocaleto get the formatting characters you want.You may need to do something like:
with an appropriate parameter to
getInstance()for your country and language.