JPanel in Scrollpane nich Automatisch Anpassen

Hallo an alle, ich habe ein Problemm. Ich habe für meine GameEngine gestern die API fertiggestellt. Nun möchte ich ein Level editor erstellen. Ich habe dazu
eine Jar erstellt, die so ausseht

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package paintpanel;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import java.util.Vector;
import javax.swing.JPanel;

/**
 *
 * @author Andreas
 */
public class PaintPanel extends JPanel {
    private Vector<Rectangle> Matrix;
    private boolean GridLinesEnable;
    private Color GridColor;
    private int CellWidth;
    private int CellHeight;
    private int Rows;
    private int Columns;
    
    
    public PaintPanel()
    {
        this.Matrix = new Vector<Rectangle>();
        this.GridLinesEnable = true;
        this.GridColor = Color.WHITE;
        this.setBackground(Color.GRAY);
        this.paintComponent(null);
        this.CellWidth = 32;
        this.CellHeight = 32;
        this.Columns = 64;
        this.Rows = 64;
        this.BuildMatrix();
    }
    

    @Override
    public void paintComponent(Graphics g)
    {
       if(this.Matrix.size() > 0)
       {
           BufferedImage image = new BufferedImage(this.Columns * this.CellWidth, this.Rows * this.CellHeight, BufferedImage.TYPE_INT_ARGB);
           Graphics2D g2d = image.createGraphics();
           
           // Paint Grid
           for(Rectangle rect : this.Matrix)
           {
               g2d.setColor(this.GridColor);
               g2d.drawRect(rect.x, rect.y, rect.width, rect.height);
           }
           
           // Draw the panel
           g.drawImage(image, 0, 0, this);
       }
    }
    
    private void BuildMatrix()
    {
        this.Matrix.clear();
        this.setSize(this.Columns * this.CellWidth, this.Rows * this.CellHeight);
        for(int i = 0 ; i < this.Rows ; i++)
        {
            for(int ii = 0 ; ii < this.Columns ; ii++)
            {
                Rectangle rect = new Rectangle(ii * this.CellWidth, i * this.CellHeight, this.CellWidth, this.CellHeight);
                this.Matrix.add(rect);
            }
        }
    }
    
        public boolean isGridLinesEnable() {
        return GridLinesEnable;
    }

    public void setGridLinesEnable(boolean GridLinesEnable) {
        this.GridLinesEnable = GridLinesEnable;
    }

    public Color getGridColor() {
        return GridColor;
    }

    public void setGridColor(Color GridColor) {
        this.GridColor = GridColor;
    }

    public int getCellWidth() {
        return CellWidth;
    }

    public void setCellWidth(int CellWidth) {
        this.CellWidth = CellWidth;
        this.BuildMatrix();
    }

    public int getCellHeight() {
        return CellHeight;
    }

    public void setCellHeight(int CellHeight) {
        this.CellHeight = CellHeight;
        this.BuildMatrix();
    }

    public int getRows() {
        return Rows;
    }

    public void setRows(int Rows) {
        this.Rows = Rows;
        this.BuildMatrix();
    }

    public int getColumns() {
        return Columns;
    }

    public void setColumns(int Columns) {
        this.Columns = Columns;
        this.BuildMatrix();
    }
    
    public int getWidth()
    {
        return this.Columns * this.CellWidth;
    }
    
    public int getHeight()
    {
        return this.Rows * this.CellHeight;
    } 
}

und füge diese klasse in ein Scrollpanel

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package genesissandbox;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.HeadlessException;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import paintpanel.PaintPanel;

/**
 *
 * @author Andreas
 */
public class GenesisSandbox extends JFrame{
    private PaintPanel PaintPanel;
    
    public GenesisSandbox() {
        this.setLayout(new BorderLayout());
        this.setSize(400, 600);
        this.setTitle("Genesis Game Engine - Level Editor");
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        
        this.PaintPanel = new PaintPanel();
        this.PaintPanel.setGridColor(Color.BLACK);
        this.PaintPanel.setSize(this.PaintPanel.getWidth(), this.PaintPanel.getHeight());
        this.PaintPanel.setLocation(0, 0);
               
        JScrollPane ScrollPane = new JScrollPane();
        ScrollPane.setViewportView(this.PaintPanel);
        ScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        ScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        
        this.add(ScrollPane, BorderLayout.CENTER);
        this.setVisible(true);
        
    }
 
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        GenesisSandbox editor = new GenesisSandbox();
        
    }
    
}

so aber der Panel kann nicht hin und her gesrollt werden, da sich die Größe des PaintPanel auf die Größe des ScrollPane skalliert.

*** Edit ***

Habe es, es lag an this.setSize(this.Columns * this.CellWidth, this.Rows * this.CellHeight); man muss aber this.setPreferredSize(new Dimension(this.Columns * this.CellWidth, this.Rows * this.CellHeight)); machen