void winx() {

        String c1 = box1.getText();
        String c2 = box2.getText();
        String c3 = box3.getText();
        String c4 = box4.getText();
        String c5 = box5.getText();
        String c6 = box6.getText();
        String c7 = box7.getText();
        String c8 = box8.getText();
        String c9 = box9.getText();
        if (((c1.equals(c2)) && (c2.equals(c3)) && (c1.equals("X")))
                || ((c4.equals(c5)) && (c5.equals(c6)) && (c4.equals("X")))
                || ((c7.equals(c8)) && (c8.equals(c9)) && (c7.equals("X")))
                ||/*
                 * Horizontal Complete
                 */ ((c1.equals(c4)) && (c4.equals(c7)) && (c1.equals("X")))
                || ((c2.equals(c5)) && (c5.equals(c8)) && (c2.equals("X")))
                || ((c3.equals(c6)) && (c6.equals(c9)) && (c3.equals("X")))
                ||/*
                 * Vertical Complete
                 */ ((c1.equals(c5)) && (c5.equals(c9)) && (c1.equals("X")))
                || ((c3.equals(c5)) && (c5.equals(c7)) && (c3.equals("X")))) /*
         * Doagonal Complete
         */ {

            JOptionPane.showMessageDialog(null, "X WINS!!");
            refresh.doClick(1000);
        }

    }