title: NullPointerException - JavaFX
body: <p>I am getting NullPointerException in this code.
  I am using JavaFX 2.2 , NetBeans IDE 7.3.1, Windows 8, Java 1.7.0</p>
  
  <pre><code>    public class SampleController implements Initializable {
      @FXML
      GridPane grid;
      @Override
      public void initialize(URL url, ResourceBundle rb) {
          // TODO
          for(int i=0;i&lt;10;i++){
              for(int j=0;j&lt;4;j++){
                  AnchorPane tile = new AnchorPane();
                  tile.setMaxSize(225, 225);
                  grid.add(tile, j, i);
              }
          }
      }
  }
  </code></pre>
  
  <p>-JavaFX 2.2</p>