title: CALCULATING BMI USING JOptionPane
body: <p>I just recently started programming in java and i am trying to create a program that calculates bmi using <code>JOptionPane</code>, The program seems to be running fine but for some reason my message dialog box wont come up, it is really frustrating and ill be much obliged if you could help me out</p>
  
  <pre><code>String weightstring = JOptionPane.showInputDialog("enter your weight in pounds:");
      Double weight =Double.parseDouble(weightstring);
      String heightstring = JOptionPane.showInputDialog("enter your height in inches:");
      Double height =Double.parseDouble("heightstring");
      final Double KGPERPOUND = 0.45359237;
      final Double METRESPERINCH  =0.0254 ;
      Double weightkg = weight* KGPERPOUND ;
      Double heightmetres= height*METRESPERINCH ;
      Double BMI = weightkg /(heightmetres*heightmetres);
      String output= "your BMi is "+BMI;
      JOptionPane.showMessageDialog(null,output);
      if (BMI&lt;16)
          JOptionPane.showMessageDialog(null,"you are seriously underweight get something to eat:");
      else if (BMI&lt;18)
          JOptionPane.showMessageDialog(null,"you are underweight try eating  more:");
      else if(BMI &lt; 24)
       JOptionPane.showMessageDialog(null,"you are normal weight ,perfecto A+:");
      else if (BMI&lt;29)
          JOptionPane.showMessageDialog(null,"you are seriously overweight fatso:");
      else if (BMI&lt;35)
          JOptionPane.showMessageDialog(null,"you are seriously overwight n thats putting it nicely:");
      else
          JOptionPane.showMessageDialog(null,"you are gravely overweight theres nno hope for you u should probably kill yourself:");
  </code></pre>