DecimalFormat df = new DecimalFormat();
df.setGroupingUsed(true);
df.setGroupingSize(3);
DecimalFormatSymbols decimalFormatSymbols = getDecimalFormatSymbols();
decimalFormatSymbols.setDecimalSeparator('.');
decimalFormatSymbols.setGroupingSeparator(' ');
df.setDecimalFormatSymbols(decimalFormatSymbols);
String sample = df.format(1023.3443d)