int w = getSize().width/grid;
int h = getSize().height/grid;
boolean black = false;
for ( int y = 0; y <= grid; y++ )
for ( int x = 0; x <= grid; x++ ) {
g.setColor( (black = !black) ? Color.black : Color.white );
g.fillRect( x * w, y * h, w, h );
}
g.drawImage( img, currentX, currentY, imgWidth, imgHeight, this );