title: Creating a Grid with rectangles
body: <p>I'm trying to create a grid of rectangles but not sure how to go from here?
  I also don't know if this is right so far</p>
  
  <pre><code>public CGOL (int x, int y, int size, int squares1) {
    numberOfSquares = 100;
    isAlive = new boolean [numberOfSquares][numberOfSquares];
    squares = new Rectangle.Double [numberOfSquares][numberOfSquares];
    int rows = 12;
    int cols = 40;
    int width = getSize().width;
    int height = getSize().height;
  
    int rowHt = height / (rows);
    int rowWid = width / (cols);
  
    for (int i = 0; i &lt; rows ; i++) {
      for (int j = 0; i &lt; rows ; j++) {
      double locationX = (i * rowHt);
      double locationY = (j * rowWid);
  
  
  squares[i][j] = new Rectangle2D.Double(locationX,locationY, rows, cols);
  </code></pre>