public Dimension getPreferredSize ( ) { final int numberOfColumns = this . cellGrid . getNumberOfColumns ( ) ; final int numberOfRows = this . cellGrid . getNumberOfRows ( ) ; return new Dimension ( this . cellSize * numberOfColumns , this . cellSize * numberOfRows ) ; }
This is the preferred size .