title: How do you transfer a variable that is within a private method ActionPerformed to another method in Java?
body: <p>I created a graphical interface in a small program in Java. When you create the fields in the graphical interface, you have automatically created the actionPerformed(java.awt.event.ActionEvent evt) methods, which are automatically private methods.
  I created a JTextField to receive what the user types. Then I created a string variable, such as:
  String inputfieldinstring = inputtext.gettext().Tostring();
  Then I turned into an integer variable:
  int inputValueInteger = Integer.parseInt(inputfieldinstring);</p>
  <p>How to transfer the inputValueInInteger variable, which is within the private inputTextActionPerformed (java.awt.event.aVTEvent EvT) method for another method to process data processing?</p>
  <p>Below, I want to take the variable called inputValueInInteger that is inside the ActionPerformed(java.awt.event.ActionEvent evt), which is a private method, and transfer to other method to do the processing. How do you do this?</p>
  <pre><code>private void inputTextActionPerformed(java.awt.event.ActionEvent evt) {                                          
          String inputFieldInString = inputText.getText().toString();
          inputValueInInteger = Integer.parseInt(inputFieldInString);
          }``` 
  </code></pre>