private void btnAction(int x, int y) {
        prompt = true;
        buttons[x][y].setIcon(new ImageIcon(getClass().getResource("/crs.png")));
        buttons[x][y].setEnabled(false);
        mark(ar, x, y);
        if (win() == 1) {
            wonLbl.setText("You won!");
            int count = Integer.parseInt(playerlabel.getText());
            playerlabel.setText((count + 1) + "");
            for (int i = 0; i < 3; i++) {
                for (JButton b : buttons[i]) {
                    b.setEnabled(false);
                }
            }
            return;
        } else if (win() == -1) {
            wonLbl.setText("It is a draw!");
            int count = Integer.parseInt(tiesLabel.getText());
            tiesLabel.setText((count + 1) + "");
            for (int i = 0; i < 3; i++) {
                for (JButton b : buttons[i]) {
                    b.setEnabled(false);
                }
            }
            return;
        }
        prompt = false;
        respond();
        if (win() == 5) {
            wonLbl.setText("You lost!");
            int count = Integer.parseInt(computerLabel.getText());
            computerLabel.setText((count + 1) + "");
            for (int i = 0; i < 3; i++) {
                for (JButton b : buttons[i]) {
                    b.setEnabled(false);
                }
            }
            return;
        } else if (win() == -1) {
            wonLbl.setText("It is a draw!");
            int count = Integer.parseInt(tiesLabel.getText());
            tiesLabel.setText((count + 1) + "");
            for (int i = 0; i < 3; i++) {
                for (JButton b : buttons[i]) {
                    b.setEnabled(false);
                }
            }
            return;
        }
    }