title: Java add ActionListener on a separate class
body: <p>Heres what I want to do, one of the classes is for a JFrame which contains all JButtons, I want another class to listen for the actions made on the JFrame class. 
  See the code below:</p>
  
  <pre><code>public class Frame extends JFrame{
      //all the jcomponents in here
  
  }
  
  public class listener implements ActionListener{
      //listen to the actions made by the Frame class
  
  }
  </code></pre>
  
  <p>Thanks for your time.</p>