@Override
    public void paintComponent(Graphics g) {
        Graphics2D graphics = (Graphics2D) g;
        super.paintComponent(graphics);

        /*
         * Berechnung der Groesse der Blockelemente. Die Groesse ist abhaengig
         * von der Anzahl der Spalten und Zeilen und der jeweils verfuegbaren
         * Hoehe und Breite des Panels.
         */
        int heightBlockSize = this.getHeight() / Field.rows;
        int widthBlockSize = this.getWidth() / Field.columns;

        int blockSize = (heightBlockSize * Field.columns > getWidth())
                ? widthBlockSize : heightBlockSize;

        setBlocksize(blockSize);

        Point startPoint = new Point(0, 0);

        for(int i = 0; i < Field.rows; i++) {

            startPoint.x = 0;

            for(int j = 0; j < Field.columns; j++) {
                BlockElement block = field[currentLayer].getBlockElement(j, i);
                graphics.setColor(block.getColor());
                graphics.fillRect(startPoint.x, startPoint.y,
                        blockSize, blockSize);
                graphics.setColor(block.getBorderColor());
                graphics.drawRect(startPoint.x, startPoint.y,
                        blockSize, blockSize);


                startPoint.x += blockSize;
            }

            startPoint.y += blockSize;
        }
    }