title: Limiting Number of Decimal Places in GWT?
body: <p>In pure Java, I would normally have a function like the one below for limiting the number of decimal places to <code>decimalCount</code> for a given number <code>value</code>. However, according to the GWT docs, "GWT does not provide full emulation for the date and number formatting classes (such as java.text.DateFormat, java.text.DecimalFormat, java.text.NumberFormat, and java.TimeFormat)." What would one do to the following function in order to make it work in GWT?</p>
  
  <pre><code>public static String getFormatted(double value, int decimalCount) { 
      DecimalFormat decimalFormat = new DecimalFormat();
      decimalFormat.setMaximumFractionDigits(decimalCount);
      return decimalFormat.format(value);
  }
  </code></pre>