ArrayList prints "5.0E-4%" instead of 0.0005

1k views Asked by At

I have this button

JRadioButton rdbtn1CE38 = new JRadioButton("> 100 %");
    rdbtn1CE38.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            CE.set(37,0.0005);
            label_CE.setText("CE:"+(CE.get(0)+CE.get(1)+CE.get(2)+CE.get(3)+CE.get(4)+CE.get(5)+CE.get(6)+CE.get(7)+
                    CE.get(8)+CE.get(9)+CE.get(10)+CE.get(11)+CE.get(12)+CE.get(13)+CE.get(14)+CE.get(15)+CE.get(16)+
                    CE.get(17)+CE.get(18)+CE.get(19)+CE.get(20)+CE.get(21)+CE.get(22)+CE.get(23)+CE.get(24)+CE.get(25)+
                    CE.get(26)+CE.get(27)+CE.get(28)+CE.get(29)+CE.get(30)+CE.get(31)+CE.get(32)+CE.get(33)+CE.get(34)+
                    CE.get(35)+CE.get(36)+CE.get(37)+CE.get(38)+CE.get(39)+CE.get(40)+CE.get(41))+"% ");

        }
    });

And I need it to print 0.0005 when pressed but it keeps printing "5.0E-4%" any idea what that means? Thanks

1

There are 1 answers

1
David W On BEST ANSWER

The "5.0E-4" is scientific notation for the number 0.0005; 5 x 10**-4. The % is just the % at the end of your JRadioButton constructor text.