title: java temperature conversion in GUI
body: <p>im struggling again, with doing a program in java that converts the temperature from celsius to fahrenhiet, but it must be done in a GUI so that the user may enter in a number for celsius and click a botton to convert it. ive been modeling it off of a example in my book however in the book it shows it working with out having a static main(), but my IDE gave me an error saying that it was needed, so ive added a static main() and ive tried calling the tempwindow() to see if that would work but still nothing and even if i comment out the call it doesnt give me a error but nothing happens. 
  im hopping someone can help show me what im doing wrong and how i should go about this.</p>
  
  <pre><code>import javax.swing.JOptionPane;
  import javax.swing.*;
  import java.awt.event.*;
  
  public class tempcon extends JFrame
  {
      private JPanel panel;
      private JLabel messageLabel;
      private JTextField tempC;
  //    private JRadioButton tempF;
  //    private ButtonGroup radioButtonGroup;
      private JButton calcButton;
      private final int WINDOW_WIDTH = 400;
      private final int WINDOW_HEIGHT = 100;
  
      public tempwindow()
      {
         setTitle("Temurture convertion");
         setSize(WINDOW_WIDTH, WINDOW_HEIGHT);
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         buildPanel();
         add(panel);
         setVisible(true);
      }
  
      private void buildPanel()
      {
          messageLabel = new JLabel("enter tempurture in celsius");
          tempC = new JTextField(10);
          calcButton = new JButton("convert");
  
          calcButton.addActionListener(new CalcButtonListener());
          panel = new JPanel();
  
          panel.add(messageLabel);
          panel.add(tempC);
          panel.add(calcButton);
  
      }
      private class CalcButtonListener implements ActionListener
      {
          public void actionPerformed(ActionEvent e)
          {
              String input;
              double temp;
              input = tempC.getText();
              temp = Double.parseDouble(input) * 1.8 + 32;
              JOptionPane.showMessageDialog(null, "that is " + temp + "degrees fehrenhiet");
          }
      }
      public static void main(String[] args)
      {
          tempwindow();
  
      }
  }
  </code></pre>