title: JFrame's keylistener with actionlistener
body: <p>I'm trying to add a KeyListener to my JFrame and the key pressed will do all the code inside an ActionListener class. </p>
  
  <p>Example :</p>
  
  <p>When I press F1, it will trigger the ActionListener class. Doing all the instructions.</p>
  
  <p>Any help?
  Thank you in advance.</p>