title: How to Bind the Values of an Array of Doubles to a Large Number of Labels in JavaFX 2
body: <p>I am trying to create a simulation program that will count the number of times two players will get certain combination of cards out of a large number of trials. Currently, I have neatly positioned a bunch of labels using JavaFX's Scene Builder in a table and have their fx:id's referenced in my controller class. Each time I run the simulation one of 20+ outcomes will occur. And each time a certain outcome happens I want to add one to the the appropriate label. Also I want to see the values on the labels update as the computer does its calculations.</p>
  
  <p>Currently I have a simple integer array that keeps track of the number of times an outcome happened. However, I am having trouble binding that integer array to the labels. The potential solution that I found</p>
  
  <pre><code>int i = 0;
  Label.textProperty().bind(String.valueOf(i));
  </code></pre>
  
  <p>does not seem to work. Furthermore, I have tried doing numerous things with DoubleProperties and NumberBindings, but, to be honest, I don't have a clue what I am doing. Can someone please explain to me a simple solution for this problem or provide me a reference for bindings in JavaFX 2 that are relevant to my problem (I have read oracle's one page tutorial on bindings but it did not seem exactly relevant)? </p>