public void valueChanged(ListSelectionEvent e)
    {

        //Check if somthing has changed
        if (e.getValueIsAdjusting()) return;

        //Check if its my turn
        if (myTurn) {
            myTurn = false;
            this.setStatusMessage("Opponent's turn");
        } else return; //Else do nothing

        //Get x and y coordinates of changed cell.
        int x = board.getSelectedColumn();
        int y = board.getSelectedRow();
        if (x == -1 || y == -1 || !boardModel.isEmpty(x, y)){
            return;
        }
        //Do move on local model. Check if I won.
        if (boardModel.setCell(x, y, playerMarks[currentPlayer]))
            setStatusMessage("Player " + playerMarks[currentPlayer] + " won!");
        currentPlayer = 1 - currentPlayer; // The next turn is by the other player.

        //Do move on remote opponents model.
        try {
            remotePlayer.valueChanged(x,y);
        } catch (RemoteException e1) {
            e1.printStackTrace();
        }


    }