title: Celsius, Fahrenheit converter in java with JOptionPane
body: <p>I'm trying to write down something more sophisticated than simple Fahrenheit to Celsius and vice versa converter. I'm trying to use JoptionPane for better fell but I'm stuck in one place and have no idea how to resolve this (line 32 and 37 - method not applicable for the arguments ()) any help will be appreciated.</p>
  
  <pre><code>import java.text.DecimalFormat;
  import javax.swing.JOptionPane;
  
  public class ex74v3 {
  
      public static void main(String[] args) {
          temp();
          new ex74v3();
      }
  
      public ex74v3() {
  
          boolean done=false;
          while(!done){
  
              done=true;
              String[] ans=new String[11];
              String[] choice={
                      "(°F) to (°C)",
                      "(°C) to (°F)",
              };
              int choice_indx=JOptionPane.showOptionDialog(null, "Choose  type of conversion", "Choice",
                      0,JOptionPane.QUESTION_MESSAGE ,
                      null,choice,0);
              ans[0]=choice[choice_indx];
              if(choice_indx==1 || choice_indx==2) {
                  done=false;
              }else{
                  choice_indx=JOptionPane.showMessageDialog(null, "Fahrenheit to Celsius: " + baseFtC() + " (°C)");
              }
              if(choice_indx==2) {
                  done=false;
              }else{
                  choice_indx=JOptionPane.showMessageDialog(null, "Celsius to Fahrenheit : " + baseCtF() + " (°F)");
              }
          }
      }
  
      public static int temp() {
          String value = JOptionPane.showInputDialog(null, "Enter value ");
          @SuppressWarnings("unused")
          int log;
          return log = Integer.parseInt(value);
      }
  
  
      public int baseCtF(int value) {
          int conversion = (int) (temp() * 1.8 + 32);
          return conversion;
      }
  
      public int baseFtC(int value) {
  
          int conversion = (int) ((temp() - 32) / 1.8);
          return conversion;
      }
  }
  </code></pre>