Class TicTacToe.Button

java.lang.Object
  extended by TicTacToe.Button
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
TicTacToe

 class TicTacToe.Button
extends java.lang.Object
implements java.awt.event.ActionListener

Class that is implemented by the 9 buttons in the grid. Checks the source of the aev to recognize the button that was clicked and then checks what symbol is to be set as the label for that button. Also checks if someone has managed to get 3 in a row on each click wich in turn adds to the winners score, or adds to the ties counter and then disables the rest of the buttons.


Constructor Summary
TicTacToe.Button()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent aev)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TicTacToe.Button

TicTacToe.Button()
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent aev)
Specified by:
actionPerformed in interface java.awt.event.ActionListener