In that game I used JFrame, JPanel, JButton, JLabel and Thread
Source Code Of When O Wins!
public void oWins(int a, int b, int c)`
buttons[a].setBackground(Color.green);`
buttons[b].setBackground(Color.green);`
buttons[c].setBackground(Color.green);`
for (int i = 0; i < 9; i++) { `
buttons[i].setEnabled(false); `
} `
textField.setText("O Wins"); `
} `
Source Code Of When X Wins!
public void xWins(int a, int b, int c)`
buttons[a].setBackground(Color.green);`
buttons[b].setBackground(Color.green);`
buttons[c].setBackground(Color.green);`
for (int i = 0; i < 9; i++) { `
buttons[i].setEnabled(false); `
} `
textField.setText("X Wins"); `
} `