title: Lag when displaying many images in JavaFX GridPane
body: <p>I'm trying to display a bunch of images with JavaFX in a GridPane using constraints, and my code does show them perfectly. However, for some reason the images cause my stage to lag, despite my code working. Is there a way I could get around this?</p>
  <p>For context, &quot;arr&quot; is a 2d ArrayList that I've made to have strings, and checkBoxList contains some checkboxes arranged in columns of around 40 each, with a spacing of 2 in between them.</p>
  <pre><code>public void setUpTypeImages()
  {
    for (int p = 0; p &lt; arr.size(); p++)
    {
       typesList.add(new ArrayList&lt;ImageView&gt;());
       for (int y = 0; y &lt; arr.get(p).size(); y++)
       {  
          ImageView type = new ImageView(&quot;Types\\&quot; + arr.get(p).get(y) + &quot;.png&quot;);
          typesList.get(p).add(type);
          typesList.get(p).get(y).setFitWidth(30);
          typesList.get(p).get(y).setFitHeight(30);     
          GridPane.setConstraints(typesList.get(p).get(y), GridPane.getColumnIndex(checkBoxList.get(p)) + y + 1, GridPane.getRowIndex(checkBoxList.get(p))); 
          choiceLayout.getChildren().add(typesList.get(p).get(y));
       }
    }
  }
  </code></pre>