@Override
    protected void paintComponent(Graphics g) {
        // draw background
        g.drawImage(this.imgBackground, 0, 0, null);

	// draw pieces
	for (FigureGUI guiFigure : this.guiFigures) {
            if(!guiFigure.isCaptured()) {
                g.drawImage(guiFigure.getImg(), guiFigure.getX(), guiFigure.getY(), null);
            }
        }
        // draw last move, if user is not dragging game piece
        if( !isUserDraggingFigure() && this.lastMove != null ) {
            int highlightSourceX = convertColumnToX(this.lastMove.getSourceColumn());
            int highlightSourceY = convertRowToY(this.lastMove.getSourceRow());
            int highlightTargetX = convertColumnToX(this.lastMove.getTargetColumn());
            int highlightTargetY = convertRowToY(this.lastMove.getTargetRow());
            
            g.setColor(Color.YELLOW);
            g.drawRoundRect( highlightSourceX+4, highlightSourceY+4, SQUARE_WIDTH-8, SQUARE_HEIGHT-8,10,10);
            g.drawRoundRect( highlightTargetX+4, highlightTargetY+4, SQUARE_WIDTH-8, SQUARE_HEIGHT-8,10,10);
        }
        // draw valid target locations, if user is dragging a game piece
        if( isUserDraggingFigure() ){
            MoveValidator moveValidator = this.game.getMoveValidator();
            
            // iterate the complete board to check if target locations are valid
            for (int column = Figure.COLUMN_A; column <= Figure.COLUMN_H; column++) {
                for (int row = Figure.ROW_1; row <= Figure.ROW_8; row++) {
                    int sourceRow = this.dragFigure.getFigure().getRow();
                    int sourceColumn = this.dragFigure.getFigure().getColumn();

                    // check if target location is valid
                    if( moveValidator.isMoveValid( new Move(sourceRow, sourceColumn, row, column)) ){
                        
                        int highlightX = convertColumnToX(column);
                        int highlightY = convertRowToY(row);

                        // draw a black drop shadow by drawing a black rectangle with an offset of 1 pixel
                        g.setColor(Color.BLACK);
                        g.drawRoundRect( highlightX+5, highlightY+5, SQUARE_WIDTH-8, SQUARE_HEIGHT-8,10,10);
                        // draw the highlight
                        g.setColor(Color.GREEN);
                        g.drawRoundRect( highlightX+4, highlightY+4, SQUARE_WIDTH-8, SQUARE_HEIGHT-8,10,10);
                    }
                }
            }
        }
        // draw game state label
        this.lblGameState.setText(this.getGameStateAsText());
    }