title: How can I update label's text using Timeline in JavaFX?
body: <p>So basically I am creating a simulation system that simulates temperature rising and falling in a room due to certain factors.
  I want to output how the temperature changes over time using a Label. I've tried using Timeline in this way: </p>
  
  <pre><code>                Timeline timeline = new Timeline();
                  List&lt;KeyValue&gt; values = new ArrayList&lt;KeyValue&gt;();
                  values.add(new KeyValue(label.textProperty(), "1"));
                  values.add(new KeyValue(label.textProperty(), "2"));
                  values.add(new KeyValue(label.textProperty(), "3"));
                  values.add(new KeyValue(label.textProperty(), "4"));
  
  
                  timeline.getKeyFrames().add(new KeyFrame(new Duration(4000), values.toArray(new  KeyValue[values.size()])));
                  timeline.play();
  </code></pre>
  
  <p>I expected this code to show "1" and then "2", but it just waits 4 seconds and changes label's text to "4".</p>
  
  <p>How can I achieve the gradual changing I want?</p>
  
  <p>Thanks!</p>