Duplicate :
|
Name: stC104175 Date: 04/14/2000 Java Version JDK 1.2.2 Formatting large double values with java.text.FormatDecimal changes the value that should be formatted. (see Screenshot). Formatting is done by void input_focusLost(FocusEvent e) { DecimalFormatSymbols symbols = new DecimalFormatSymbols(); DecimalFormat decForm = new DecimalFormat("###,###,###.00", symbols); output.setText(decForm.format( new Float(input.getText()).floatValue())); } if you enter: '666333999000' the result is 666,334,003,200.00 (Review ID: 103694) ======================================================================