title: JButton MouseListener not responding
body: <p>I am trying to build a minesweeper type game, more specifically the two player one that used to feature on MSN games. I have a multidimensional array of Tile objects. Each Tile has a state (mine, blank or number of mines adjacent). I have a GUI class that handles all of the front end aspects of the program.</p>
  
  <p>Each Tile extends JButton and implements MouseListener, however when I click on a button it does not fire the MouseClicked method for the corresponding button/tile.</p>
  
  <p>Code is as follows :</p>
  
  <pre><code>public class Tile extends JButton implements MouseListener {
  
  private int type;
  
  public Tile(int type, int xCoord, int yCoord) {
      this.type = type;
      this.xCoord = xCoord;
      this.yCoord = yCoord;
  }
  
  public int getType() {
      return type;
  }
  
  public void setType(int type) {
      this.type = type;
  }
  
  @Override
  public void mouseClicked(MouseEvent e) {
      System.out.println("Clicked");
  }
  
  }
  </code></pre>
  
  <p>And the GUI class :</p>
  
  <pre><code>public class GUI extends JPanel {
  
  JFrame frame = new JFrame("Mines");
  private GameBoard board;
  private int width, height;
  
  public GUI(GameBoard board, int width, int height) {
      this.board = board;
      this.width = width;
      this.height = height;
      this.setLayout(new GridLayout(board.getBoard().length, board.getBoard()[0].length));
      onCreate();
  }
  
  private void onCreate() {
      for (int i = 0; i &lt; board.getBoard().length; i++) {
          for (int j = 0; j &lt; board.getBoard()[i].length; j++) {
              this.add(board.getBoard()[i][j]);
          }
      }
  
      frame.add(this);
      frame.setSize(width, height);
      frame.setMinimumSize(this.minFrameSize);
      frame.setPreferredSize(new Dimension(this.width, this.height));
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setVisible(true);
  }
  }
  </code></pre>
  
  <p>Does the GUI class JPanel intercept MouseClick events preventing the buttons from receiving the click event?</p>