title: Changing the cursor in an alertbox JavaFX
body: <p>Hi I am trying to change the cursor, in  a JavaFX alert which displays once a button in <code>sceneHome</code> is pressed,  once a buttontype is clicked.</p>
  
  <p>This is the function thats gets called when the user presses the button in <code>sceneHome</code>:</p>
  
  <pre><code>public void export() {
      Alert alert = new Alert(AlertType.CONFIRMATION);
      alert.setTitle("Export menu");
      alert.setHeaderText("Wat wilt u exporteren, adressen of ritten?");
      alert.setContentText("Maak een keuze.");
      ButtonType buttonTypeOne = new ButtonType("Adressen");
      ButtonType buttonTypeTwo = new ButtonType("Ritten");
      ButtonType buttonTypeCancel = new ButtonType("Annuleren", ButtonData.CANCEL_CLOSE);
  
      alert.getButtonTypes().setAll(buttonTypeOne, buttonTypeTwo, buttonTypeCancel);
  
      Optional&lt;ButtonType&gt; result = alert.showAndWait();
      if (result.get() == buttonTypeOne){
          //scene.setCursor(Cursor.WAIT);
          ToCSV.export("adressen");
          //scene.setCursor(Cursor.DEFAULT);
      } else if (result.get() == buttonTypeTwo) {
          //scene.setCursor(Cursor.WAIT);                
          ToCSV.export("ritten");
          //scene.setCursor(Cursor.DEFAULT);
      } else{
          //do nothing
      }
  }
  </code></pre>
  
  <p>If I say <code>sceneHome.setCursor(Cursor.WAIT)</code> nothing happens and if I say <code>alert.getDialogPane().getScene().setCursor(Cursor.WAIT)</code> I get a <code>NullPointerException</code>...</p>
  
  <p>So which scene should I pass in (at <code>//scene.setCursor(Cursor.DEFAULT);</code> and <code>//scene.setCursor(Cursor.WAIT);</code>)?</p>