title: How to exit a method in ActionListener
body: <p>I have an <code>ActionListener</code> connected to a <code>JTextField</code> and  want to type something so that it will exit the method the <code>ActionListener</code> is in.</p>
  
  <p>Code:</p>
  
  <pre><code>main() {
      Security(x,x,x);
  }
  public void Security(JTextArea out, JTextField in) {
          in.setText("");
          in.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent ae) {
                  if (in.getText().contains("exitsys")) {
                      out.append("Security:Security System Deactivated\n");
                      return;
                  }
                  in.setText("");
              }
          });
          out.append("Security:Security System Activated\n");
          fileWrite(":SYSTEM_INITIATED@" + time(), out);
      }
  </code></pre>
  
  <p>I want to type <code>"exitsys"</code> and return to the main class method <code>"main()"</code>.</p>
  
  <p>The <code>fileWrite</code> method uses a <code>PrintWriter</code> to output data.</p>
  
  <p>QUESTION SUMMARY: I try calling return; but it does not return to the method main(), how do i fix this?</p>