private void setHighlightPosition() {
    if ( activePosition != null ) {
      int x, y;
      if ( perspective == WHITE ) {
        x = activePosition.getX () - 1;
        y = activePosition.getY () - 1;
      }
      else {
        x = CELL_AMOUNT - activePosition.getX ();
        y = CELL_AMOUNT - activePosition.getY ();
      }

      int cellcol = ( ( x ) * rectSize );
      int cellrow = ( ( y ) * rectSize );
      boardRep.setColor (activeBG);
      boardRep.fillRect (cellcol + 1 + LEFTLEGEND_SPACE, cellrow + 1, rectSize,
          rectSize);
    }

    if ( boardData.kingInCheck () ) {
      Position p = new Position (boardData.getKingPosition ());
      paintPic (p, PIC_INDEX_KING_IN_CHECK);
    }

    if ( possibleMoves != null ) {
      for (int i = 0; i < possibleMoves.size (); i++) {
        Position thisPosition = possibleMoves.get (i);
        int x, y;
        if ( perspective == WHITE ) {
          x = thisPosition.getX () - 1;
          y = thisPosition.getY () - 1;
        }
        else {
          x = CELL_AMOUNT - thisPosition.getX ();
          y = CELL_AMOUNT - thisPosition.getY ();
        }

        int cellcol = ( ( x ) * rectSize );
        int cellrow = ( ( y ) * rectSize );
        boardRep.setColor (possibleBG);
        boardRep.fillRect (cellcol + 1 + LEFTLEGEND_SPACE, cellrow + 1,
            rectSize, rectSize);
        if ( boardData.enemyPieceAt (thisPosition.getSquarePosition ()) ) {
          paintPic (thisPosition, PIC_INDEX_CAPTURE);
        }
      }
    }

  }