title: How can I add two double values together to form another double value(casting)
body: <p>Basically, say if I have two double values as such:</p>
  
  <pre><code> import javax.swing.JSpinner;
   import javax.swing.SpinnerNumberModel;
  
  
  public class UI  {
      public static void main(String args[]){
          JSpinner stonesSpinnerImperial;
          JSpinner poundsSpinnerImperial;
  
          stonesSpinnerImperial = new JSpinner();
          poundsSpinnerImperial = new JSpinner();
  
          stonesSpinnerImperial.setModel(new SpinnerNumberModel(3, 3, 31, 1));
          poundsSpinnerImperial.setModel(new SpinnerNumberModel(0.0, 0.0, 13.0, 1.0));
  
          double imperial_stones = (double) stonesSpinnerImperial.getModel().getValue();
          double imperial_pounds = (double) poundsSpinnerImperial.getModel().getValue();
          double total_imperial_weight =  imperial_stones + imperial_pounds;
  
      }
  }
  </code></pre>
  
  <p>However I get the following error:
  java.lang.Integer cannot be cast to java.lang.Double</p>
  
  <p>I feel my logic behind this is flawed and any assistance in this matter would be greatly appreciated.</p>
  
  <p>EDIT: I've added as much as I feel is required.</p>