title: Setting color of individual cells in a GridPane (JavaFX)
body: <p>I'm making tetris for a class project, and I had the idea to utilize gridpane to divide the stage into evenly spaced rows and columns. I was going to change the color of each cell individually to simulate actual pieces, but I have no idea where to go from here. I tried adding colored rectangles, but that didn't work.</p>
  
  <p>The colors are taken from a 2D array called colorArray that is 15X10, with a specific color at each index. </p>
  
  <pre><code>public void start(Stage primaryStage) throws Exception {
      pane = new GridPane();
      pane.setGridLinesVisible(true);
      pane.setVgap(40);
      pane.setHgap(40);
      primaryStage.setResizable(false);
      scene = new Scene(pane,height,width);
      for(int x = 0; x &lt; 16; x++){
          pane.getRowConstraints().addAll(getFifteenRowConstraints());
          for(int y = 0; y&lt;10; y++){
              pane.getColumnConstraints().addAll(getTenColumnConstraints());
  
  
          }
      }
      primaryStage.setScene(scene);
      primaryStage.setTitle("Russian Game");
      primaryStage.show();
  }
  </code></pre>
  
  <p>I guess I'm not exactly sure what it is row and col constraints are, all I know is I have evenly placed cells that are separated by lines. </p>
  
  <p>How would I go about changing the color of each cell individually? </p>