title: Cannot format given Object as a Number ComboBox
body: <p>How can I set an integer number into double? Let's say I have a comboBox named day, and it has 1,2,,3 elements. I want to set it as two decimal point. If user select 1, it will become 1.00. How can I do that?</p>
  
  <pre><code>public void actionPerformed(ActionEvent e){
                          String a=(String)comboBox.getSelectedItem();
                          //Integer b=(comboBox_1.getSelectedIndex()+1);
                          int day=(Integer)comboBox_2.getSelectedItem();
                          double bo;
                          DecimalFormat df = new DecimalFormat("#.##");      
                          bo= Double.valueOf(df.format(day));
  </code></pre>
  
  <p>Error I get</p>
  
  <pre><code>java.lang.IllegalArgumentException: Cannot format given Object as a Number
      at java.text.DecimalFormat.format(DecimalFormat.java:507)
      at java.text.Format.format(Format.java:157)
      at gui.User.&lt;init&gt;(User.java:105)
      at gui.User$1.run(User.java:49)
  </code></pre>