title: Why is thread.sleep crashing my JavaFX app?
body: <p>I have a for loop that iterates through all the players in my game. Before the next iteration, I want to allow the current player 3 minutes to make a selection(which is the canvas mouseclick event).  Everything I have tried crashes my app with no errors.  I've been at this for hours with no clue of what's going on.  What am I doing wrong?</p>
  
  <pre><code>    startGame.addEventHandler(MouseEvent.MOUSE_CLICKED,
                  new EventHandler&lt;MouseEvent&gt;() {
              @Override
              public void handle(MouseEvent e) {
  
                  gameStatus = "Started";
                  players.add(new Player(0, "Amrit"));
                  players.add(new Player(1, "Tyler"));
                  players.add(new Player(2, "Scott"));
                  players.add(new Player(3, "Ryker"));
  
                  //Select first two settlements with one road extending from each
                  for (int s = 0; s &lt; 2; s++) {
  
                      for (int p = 0; p &lt; players.size(); p++) {
  
                          phase = "Pick Settlements";
                          playerTurn = p;
  
                          //Loop through all tiles
                          for (int t = 0; t &lt; tiles.length; t++) {
  
                              //Loop through the vertices of the current tile
                              for (int v = 0; v &lt; tiles[t].vertices.length; v++) {
  
                                  drawCircle(gc, new Point(tiles[t].vertices[v].x, tiles[t].vertices[v].y), (int) (windowHeight * .05), true, true, "rgba(255, 238, 144, .3)", 0);
  
                              }
  
                          }
  
                          gc.setFill(Color.web("0xFFEB8A"));
                          gc.strokeText(players.get(p).name + ", please place your first settlement!", windowHeight * .95, windowWidth * .85);
                          selected = false;
                          canvas.addEventFilter(MouseEvent.MOUSE_CLICKED, new EventHandler&lt;MouseEvent&gt;() {
                              // @Override
                              @Override
                              public void handle(final MouseEvent event) {
                                  if (!pointClicked().equals(0)) {
                                      players.get(playerTurn).settlementsAvail--;
                                      selected = true;
                                  }
                              }
  
                          });
  
                          try 
                          {
                              Thread.sleep(1000 * 60 * 3);
                          } 
                          catch(InterruptedException er)
                          {
                               // this part is executed when an exception (in this example InterruptedException) occurs
                          }
                      }
  
                  }
  
                  gameStatus = "Ended";
  
              }
  
          });
  </code></pre>