This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Interactive Tic-Tac-Toe Board CSc 2700: Programming Project # 4 A Game of Tic-Tac-Toe Out: 10/26 Due: 11/8 by 11:59 PM Learning Objectives • event-driven programming • working with buttons • more on panel with grid layout 1 Introduction In lecture #15 we discuss at length how you could go about writing an interactive TicTacToe board game, using event-driven programming. Your task in this project to to implement that application with the additional requirements. The constructor, which builds the GUI, • instantiates two JButton objects: resetButton and exitButton, • registers a listener (ButtonListener) with each button, • places the buttons in a panel, • creates an array of nine JButton objects, one for each square of the Tic-Tac-Toe board, • registers a listener (ButtonListener) with each of the nine array but- tons, • places a label on a panel, • places the nine buttons in a panel using the GridLayout layout man- ager, • places the panel with the label in the frame, and • places the two panels of buttons in the frame....
View Full Document
This note was uploaded on 10/06/2009 for the course CSC 2700 taught by Professor Duncan during the Spring '08 term at LSU.
- Spring '08