Possible Duplicate:
JSpinner editor locale
I have to show 1000 value as 1.000 in the spinner in java , by default it is showing as 1,000. But in European locale the number should be in 1.000,00 format instead of 1,000.00 . Can someone help me with this. I am using below code:
JSpinner.NumberEditor editor = new JSpinner.NumberEditor(spinner, pattern);
spinner.setEditor(editor);
and using pattern as "##.##0"
, but this is throwing exception.
Can I write generic code for this which can take care of number format according to locale ie., en, fr, pt etc.?