public void paintComponent( Graphics g ) {
		super.paintComponent( g );
		Graphics2D g2 = (Graphics2D)g;
		
		for( int i = 0; i < cellx; i++ ) {
			for( int j = 0; j < celly; j++ ) {
				g2.setColor( new Color( grid[i][j], false ) );
				g2.fillRect( width*i/cellx, height*j/celly, width/cellx, height/celly );
			}
		}
		
		g2.setColor( Color.GRAY );
		
		for( int i = 0; i <= cellx; i++ ) {
			g2.drawLine( i*width/cellx, 0, i*width/cellx, height );
		}
		
		for( int i = 0; i <= celly; i++ ) {
			g2.drawLine( 0, i*height/celly, width, i*height/celly );
		}
	}