On May 19, 10:41 pm, corbinlc <
corbi...@gmail.com> wrote:
> Ok, from comparing your two replies, I found this to be correct:
> com.google.gwt.i18n.I18N
>
> This didn't help the original errors I was getting though. So, is
> java.txt.NumberFormat not supported despite what was written here:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
> ?
> And instead there is a different class that can be included that is
> also call NumberFormat, but does not do all the same things?
Yes, because everything has to be rewritten in JavaScript and because
of limitations of GWT (regarding how locales are handled for
instance).
> So, I need to include this new class and modify my code to import it
> and use it instead, including modifying any calls to unsupported
> methods?
Yes, and actually GWT's NumberFormat looks more like
java.text.DecimalFormat than java.text.NumberFormat.
> I think I am still trying to figure out if I do or don't need to
> modify my code for NumberFormat.getInstance to work as shown in the
> brief code snippet above.
JRE's NumberFormat.getInstance().format(variable) is roughly
equivalent to GWT's NumberFormat.getDecimalFormat().format(variable)
Same for getCurrencyInstance vs. getCurrentFormat and
getPercentInstance vs getPercentFormat.
And JRE's new DecimalFormat(format) is roughly equivalent to GWT's
NumberFormat.getFormat(format)
Other differences are in the javadoc.