title: Why does my keyListener stop working when fullscreen?
body: <p>I have a key listener defined in the usual way:</p>
  
  <pre><code>frame.addKeyListener(this); 
  frame.setFocusable(true);
  </code></pre>
  
  <p>And the methods to deal with the key press, which is when escape is hit the program exits.</p>
  
  <p>This works but when I make the JFrame fill the whole window using:</p>
  
  <pre><code>frame.setSize(Toolkit.getDefaultToolkit().getScreenSize());
  frame.setLocation(0, 0);
  frame.validate();     
  </code></pre>
  
  <p>Then the key listener stops working. Could someone explain why this is and what I need to do when I go fullscreen to keep the listener?</p>
  
  <p>TIA</p>