title: JavaFX: Delay TranslateTransition
body: <p>I create some node in javaFX. And I need to animate each node to translate between some point to some point in <code>Pane</code> with <code>TranslateTransition</code>. But I need to make each of that node move independently using different starting point. How to make this happen? I mean is there any something like Thread.pause in javaFX. I tried using the rough approach like in the code below:</p>
  
  <pre><code>    public void mouseRespon(final double x, final double y){
      animasi.pause(); 
      thread = new Thread(
              new Runnable() {                    
                  @Override
                  public void run() {
                      int i = 0; 
                      while(threadStatus &amp;&amp; i &lt; allList.size()){
                          final int j = i;
                          Platform.runLater(new Runnable() {
                              @Override
                              public void run() {
                                  DynamicsText text = allList.get(j); 
                                  TranslateTransition transition = new TranslateTransition();
                                  transition.setNode(text); 
                                  transition.setFromX(text.getTranslateX()); 
                                  transition.setFromY(text.getTranslateY());
                                  text.setDestinyOffset(x, y);
                                  text.initCurrentOffSet();
                                  double destX = text.getPotitionX();
                                  double destY = text.getPotitonY(); 
                                  transition.setToX(destX);
                                  transition.setToY(destY);
                                  transition.setDuration(Duration.seconds(1));
                                  transition.setAutoReverse(false); 
                                  transition.setCycleCount(1);
                                  transition.play();
                              }
                          });
                          try{
                              Thread.sleep(25);
                          }catch(Exception e){}
                          i++; 
                      }
                  }
              });
      thread.start();
      animasi.play();
  }
  </code></pre>
  
  <p>But I think  that is not a good approach. And actually, when I run that snippet make a program  crash (sometime) . </p>