code: public String format(Locale locale, double number) {
  	DecimalFormat df = getDecimalFormat(locale);
  	df.applyPattern(",0");
  	df.setGroupingSize(3);
  	return df.format(number);
      }
docs: formats a number
  
  @param number
  @return formatted number as string