title: KeyListener doesn't work when I add button to Jpanel
body: <p>I found that, when I write "pnlMap.add(map[i][j])" keylistener won't work. map is set of JButton, pnlMap is JPanel. </p>
  
  <p>public Game(Player player) 
  {</p>
  
  <pre><code>    initComponents();
      this.player = player;
      loadPlayerInfo();
      ImageIcon icon = new ImageIcon("images/items/sword_advanced.png");
      this.setIconImage(icon.getImage());
      addKeyListener(this);
      map = new Square2[20][20];
      for (int j = 0; j &lt; 20; j++) {
          for (int i = 0; i &lt; 20; i++) {
              map[i][j] = new Square2();
              pnlMap.add(map[i][j]); 
          }
      }     
  }
  </code></pre>