4 Replies Latest reply: Oct 16, 2006 12:52 PM by 798701 RSS

    BigDecimal showing scientific 0E-7 iso 0.0000000


      Since we moved from JRE1.4.x to 1.5.x we have problems with BigDecimals showing 0E-7 iso 0.0000000
      (Scientific format in stead of full value).

      I include an example of this.
      - When running with jre1.4.x, the example shows 0.0000000
      - When running with jre1.5.x, the example shows 0E-7

      How can I fix this?

      I found some info on changes but no clue on how to solve this, specially when using the BigDecimal objects in a JTable...

      package test;
       * @author pgo
       * To change the template for this generated type comment go to
       * Window>Preferences>Java>Code Generation>Code and Comments
      import java.awt.*;
      import java.awt.event.*;
      import javax.swing.*;
      import java.math.*;
       * <p>Title: </p>
       * <p>Description: </p>
       * <p>Copyright: Copyright (c) 2005</p>
       * <p>Company: </p>
       * @author not attributable
       * @version 1.0
      public class OutputBigDecimal
           extends JFrame {
        private Container content;
        private BigDecimal bd = new BigDecimal("0.0000000");
        private JTextField bdvalue = new JTextField();
        public static void main(String[] args) {
           new OutputBigDecimal();
        public OutputBigDecimal() {
           super("Output BigDecimal Value:");
           setSize(400, 150);
           content = getContentPane();
           content.setLayout(new FlowLayout());
           bdvalue.setText("Value=" + bd);