title: Java, how to make a pause in JavaFX
body: <p>I have 4 buttons and I wanna make them blink. I need a pause for that purpose. How can I simply pause for like 500ms after each iteration? <strong>Is it possible to do it without threads?</strong> </p>
  
  <pre><code>public void blink() {
          Button[] btn = new Button[]{btn1, btn2, btn3, btn4};
          Random rn = new Random();
  
          for (int i = 0; i &lt; 100; i++) {
              int d = rn.nextInt(4) + 1;
              new Timeline(
                      new KeyFrame(Duration.seconds(0), new KeyValue(btn[d - 1].opacityProperty(), .1)),
                      new KeyFrame(Duration.seconds(0.5), new KeyValue(btn[d - 1].opacityProperty(), 1))
              ).play();
              //PAUSE HERE//
          }
      }
  </code></pre>