title: Add listener after OK click
body: <p>Trying to add the current object as an <code>AcquisitionListener</code> when the user hits the OK button. However, adding it as a listener works anywhere except inside the block that executes on clicking the OK button:</p>
  
  <pre><code>    mainFrame.setOkAction(new ActionListener()
      {
          @Override
          public void actionPerformed(ActionEvent e) //On OK click
          {
              MicroManager.addAcquisitionListener(this);
          }
      }
  </code></pre>
  
  <p><em>The method addAcquisitionListener(AcquisitionListener) in the type MicroManager is not applicable for the arguments (new ActionListener(){})</em></p>
  
  <p>If I understand correctly, this happens because <strong>This</strong> is now referring  <code>ActionListener</code> for the button instead of the class object. </p>
  
  <p>How can I fix this?</p>