title: Call actionPerformed of a JTextField using its object
body: <p>I have a <code>javax.swing.JTextField</code> named <strong><em>SearchBox</em></strong> with an actionPerformed Event.</p>
  
  <pre><code>public void SearchBoxActionPerformed(java.awt.event.ActionEvent evt){
       //TODO
  }
  </code></pre>
  
  <p>What I want to do is to call the above method from another method in a different class by passing the <code>JTextField</code> object as an argument.</p>
  
  <pre><code>import javax.swing.JTextField;
  
  public class Program {
  
      public static synchronized void QuickSearchResults(JTextField textBox) {
          /*
           * I want to call ActionPerformed method of textBox if it has any.
           */
      }
  }
  </code></pre>
  
  <blockquote>
    <p>Please note that calling the method name directly is not an option. If
    I pass 3 different <code>JTextField</code> objects, the relevant ActionPerformed
    methods should be called.</p>
  </blockquote>
  
  <p>Is there a way to achieve this? I already tried using,</p>
  
  <pre><code>textBox.getActions();
  textBox.getActionListeners();
  </code></pre>
  
  <p>but it didn't go well, and now I'm back in square one.</p>
  
  <p>Thanks in advice! </p>