title: How To Take The Value From A JTextField And Move It Into A Int Variable
body: <p>I have been trying to create a JFrame program that takes two numbers and an 
  operation(inside jcombobox) to calculate the answer. I need to take the user input for number 1 and 2 and assign the value to an int that can be used in the calculation of the answer. num1 is the int variable and num1field is the name of the textfield.</p>
  
  <pre><code>    num1field.addActionListener(
          new ActionListener(){
              public void actionPerformed(ActionEvent event){
                  num1 = Integer.parseInt(num1field.getText());
                  num1field.setText(num1);
              }
          }
       );
  </code></pre>
  
  <p>And yes the num1 int has already been declared at the top of the class. I am getting an error where it says setText.</p>
  
  <p>Thanks for all the help :)</p>