Java. Checking for Winners and Managing the Game

Basically, checking the board to see if anyone has won and if there are more spaces to be selected.
import javax.swing.*;
import java.awt.geom.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.Color;
public class TicTacToe extends JPanel implements ActionListener
{
JLabel greeting = new JLabel(“Tic Tac Toe”);
JLabel promptLabel = new JLabel(“Choose one button”);
JLabel result = new JLabel();
Font headlineFont = new Font(“Helvetica”, Font.BOLD,
20);
Font mediumFont = new Font(“Helvetica”, Font.BOLD, 14);
final int SIZE = 9;
final static int ROW_SIZE = 3;
final static int COL_SIZE = 3;
int x, y;
JButton[][] gameGrid = new JButton[ROW_SIZE][COL_SIZE];
final static String BLANK = ” “;
final static String XString = “X”;
final static String OString = “O”;
int row = 0, col = 0;
int num;
boolean spotFound;
boolean isDone = false;
boolean playersTurn = true;
boolean isWinPossible = false;
String msg = “”;
String gridString;
char winChar;
public static boolean checkForWinner(JButton [][]
gameGrid)
{
boolean isDone = false;

// Your code goes here
// The code to check for winners needs to be implemented
// checkForWinner returns a boolean value representing a winner or not

return isDone;
}

public static boolean spacesRemain(JButton[][] grid)
{

// Your code goes here
// spacesRemain returns a boolean value indicating that there are stillDigitsLeft
// spaces to be selected.

return stillDigitsLeft;
}
public static void chooseSpot(JButton[][] gameGrid)
{
int x, y;
boolean placementMade = false;
for(x = 0; x < ROW_SIZE