import java.awt.*; public class Grid { Cell cell[][]; int size; // number of rows and cols int cellSize; int dX, dY; // screen offset in pixels public int row, col; // row and column of last mouse click in the grid // (-1, -1) means click was outside the grid Color color = Color.black; public Grid (int rows, int cellSize, int offset) { size = rows; this.cellSize = cellSize; cell = new Cell[size][size]; dX = offset; dY = offset; clear( ); } public void clear () { for (int i=0; i