• Post Reply Bookmark Topic Watch Topic
  • New Topic

Locale syntax  RSS feed

David Garratt
Ranch Hand
Posts: 216
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Daft as it may seem I am unclear when specifying a format to be used with a JFormattedTextField.

new DecimalFormat("###,##0.000")

In the example above I am using a comma as a place holder for the thousand (group separator) and a period for the decimal place holder.

Should I be doing this even though in Italy for example the use of comma and period are reversed.

OR should i be specifying the Decimal Format in a the more complicated way

new DecimalFormat("###"+java.text.DecimalFormatSymbols.getInstance().getGroupingSeparator()+"##0"+java.text.DecimalFormatSymbols.getInstance().getDecimalSeparator()+"000")

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!