This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
If my memory serves me right the JDK used to come bundled with some demo applications/applets, and one of them was tic tac toe. You might want to check that. It should be somewhere under JDK_HOME/samples or JDK_HOME/examples or something similar.