You can use the DecimalFormat object at described in the following link:
Double Formatting