Tic-Tac-Toe in Java - 20273

Solution Posted by
Deadbones65

Deadbones65

Rating : No Rating
Solution Detail
Price: $40.00
  • From: ,
  • Posted on: Sun 28 Jul, 2013
  • Request id: # 20116
  • Purchased: 0 time(s)
  • Average Rating: No rating
Request Description
Solution Description

/*

Title: Tic-Tac-Toe Game

Author: Deadbones65

*/

 

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

import java.io.*;

import java.util.*;

 

public cl*** TicTacToe implements ActionListener {

final String VERSION = "2.0";

//Setting up ALL the variables

JFrame window = new JFrame("Tic-Tac-Toe " + VERSION);

 

JMenuBar mnuMain = new JMenuBar();

JMenuItem mnuNewGame = new JMenuItem("New Game"),

mnuInstruction = new JMenuItem("Instructions"),

mnuExit = new JMenuItem("Exit"),

mnuAbout = new JMenuItem("About");

 

JButton btn1v1 = new JButton("Player vs Player"),

btn1vCPU = new JButton("Player vs Computer"),

btnQuit = new JButton("Quit"),

btnSetName = new JButton("Set Player Names"),

btnContinue = new JButton("Continue..."),

btnTryAgain = new JButton("Try Again?");

JButton btnEmpty[] = new JButton[10];

 

JPanel pnlNewGame = new JPanel(),

pnlMenu = new JPanel(),

pnlMain = new JPanel(),

pnlTop = new JPanel(),

pnlBottom = new JPanel(),

pnlQuitNTryAgain = new JPanel(),

pnlPlayingField = new JPanel();

 

JLabel lblTitle = new JLabel("Tic-Tac-Toe"),

lblTurn = new JLabel(),

lblStatus = new JLabel("", JLabel.CENTER);

JTextArea txtMessage = new JTextArea();

 

final int winCombo[][] = new int[][] {

Attachments
Tic-Tac-Toe.txt
Tic-Tac-Toe.txt