title: Text Area not printing input when clicked button in Java
body: <p>Heres my code guys. I have reviewed this and not sure why it is not outputting the Celcius temperature in the JTextArea once the JButton is clicked which should receive its input from the JTextField.</p>
  
  <p>Heres the code...</p>
  
  <pre><code>import javax.swing.BorderFactory;
  import javax.swing.BoxLayout;
  import javax.swing.JButton;
  import javax.swing.JFrame;
  import javax.swing.JTextArea;
  import javax.swing.JTextField;
  import javax.swing.JOptionPane;
  import javax.swing.JPanel;
  import javax.swing.JLabel;
  import javax.swing.SwingConstants;
  import java.awt.*;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  
  public class C_to_F extends JFrame {
  
      JPanel layout = new JPanel();
      JLabel title = new JLabel("&lt;html&gt;Welcome to Farenheit to Celcius!&lt;/html&gt;");
      JLabel inputtxt = new JLabel("&lt;html&gt;Input Farenheit:&lt;/html&gt;");
      static JTextField input = new JTextField (null);
      static JTextArea answer = new JTextArea();
      static JButton submit = new JButton("Submit");
  
      public static void main(String[] args) {
          JFrame frame = new C_to_F();
          frame.show();   
      }       
  
      public static void submit() {
          submit.addActionListener(new ActionListener() { 
              public void actionPerformed(ActionEvent e) { 
                  input();
              } 
          });
      }
  
      public static void input() {
          String TextBox = input.getText();
          float farenheit = Float.parseFloat(TextBox);
          for(int i=0;i&lt;=0;i++) {
              double celcius = (farenheit - 32) * 5/9;
              String celciustxt = ("Celcius = " + celcius);
              answer.setText(String.valueOf(celciustxt));             
          }
      }
  
      public C_to_F() {
          setTitle("Farenheit to Celcius");
          setSize(300,300);
          setLocationRelativeTo(null);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          setResizable(true);
          layout.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); 
          layout.setLayout(new GridLayout(8,1));          
  
          inputtxt.setHorizontalTextPosition(SwingConstants.CENTER);
          title.setHorizontalTextPosition(SwingConstants.CENTER);
  
          add(layout);
  
          layout.add(title);
          layout.add(inputtxt);
          layout.add(input);
          layout.add(submit);
          layout.add(answer);
  
          setVisible(true);
      }    
  }
  </code></pre>
  
  <p>Thanks guys!</p>