You can add an action listener to the Tile class objects because it extends the JButton class.