Package javafx.scene.control.Dialogs

Examples of javafx.scene.control.Dialogs.DialogResponse


    Dialogs.showErrorDialog(stage, "Ooops, there was an error!", "Error Dialog With Exception", "title",
        new FileNotFoundException("Could not find file blabla.txt"));
  }
 
  private void showConfirmDialog(Stage stage) {
    DialogResponse response = Dialogs.showConfirmDialog(stage, "Do you want to continue?", "Confirm Dialog", "title");
    System.out.println("ConfirmDialog Response: " + response);
  }
View Full Code Here


    DialogResponse response = Dialogs.showConfirmDialog(stage, "Do you want to continue?", "Confirm Dialog", "title");
    System.out.println("ConfirmDialog Response: " + response);
  }
 
  private void showConfirmDialogWithOptions(Stage stage) {
    DialogResponse response = Dialogs.showConfirmDialog(stage, "Are you ok with this?",
        "Confirm Dialog With Options", "title", DialogOptions.OK_CANCEL);
    System.out.println("ConfirmDialog Response: " + response);
  }
View Full Code Here

        credentials = new Credentials(username.getText(), password.getText());
        return null;
      }
    };
       
    DialogResponse resp = Dialogs.showCustomDialog(stage, grid, "Please log in", "Login", DialogOptions.OK_CANCEL, myCallback);
    System.out.println("Custom Dialog: User clicked: " + resp);
    //You must check the resp, since input fields' texts are returned regardless of what button was pressed. (ie. If user clicked 'Cancel' disregard the input)
    System.out.println("Custom Dialog: Field 'credentials' set from custom dialog: " + credentials);
  }
View Full Code Here

TOP

Related Classes of javafx.scene.control.Dialogs.DialogResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.