title: JavaFX (with FXML) Adding Action events for buttons
body: <p>I have a FXML-File build with Scene-Builder with the needed fx:ids and the following controller:</p>
  
  <pre><code>public class LaunchLogin extends Application{
  
  public static void main (String [] args) {
      launch(args);
  }
  
  @Override
  public void start (Stage primaryStage) throws Exception {
      //ResourceLoader rl = ResourceLoader.getInstance();
      FXMLLoader loader = new FXMLLoader();
      loader.setLocation(getClass().getResource("/gfx/gui/LoginScreenUI.fxml"));
      Parent root = loader.load();
      Scene scene = new Scene(root);
      scene.getStylesheets().add("/gfx/gui/cogfitStyle.css");
      primaryStage.setScene(scene);
      primaryStage.setTitle ("CogFit");
      primaryStage.show();
  }
  @FXML
  Button btn_newUser;
  
  
  @FXML
  Button btn_changePW;
  
  @FXML
  Button btn_send;
  
  @FXML
  private void test(ActionEvent event)
  {
      System.out.println("success");
  }
  }
  </code></pre>
  
  <p>Now I want to add action events to the buttons. How do I do that? I cannot really find something that involves FXML-Files.</p>