title: How to take int value in text field from other textfield
body: <p>I'm new to java. I create project where I have one textField and one button. I make function for button, where I start my other function and it's ok. But I need to take number value from textField as parameter for my function...</p>
  
  <pre><code>b1.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent e)
              {
                   int price;
                   int quantity = Integer.parseInt(tf2.getText());
                   int totalamount = price*quantity;
                //need to insert this total amout into textfield tf4 //
  
  
               tf4.getText(totalamount); //showing error ;   
  
              }
  
          });
  </code></pre>
  
  <p>help me in please ,thank you in advance</p>