tic-tac-toe written in Java using Swing