Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Stage loginDialog = new LoginDialog(stage);
- loginDialog.sizeToScene();
- loginDialog.showAndWait();
- /* do the login */
- close();
- /* need to return thew user id to the main form*/
- public class DialogBox {
- private static String[] login;
- public static String[] display(String title, String message) {
- Stage window = new Stage();
- window.initModality(Modality.APPLICATION_MODAL);
- window.setTitle(title);
- window.setWidth(300);
- window.setHeight(175);
- window.initStyle(StageStyle.UTILITY);
- Label label = new Label(message);
- //Set up the JavaFX button controls and listeners and the text fields for the login info. The button listeners set the login values
- window.setScene(new Scene(root, 300, 175);
- window.showAndWait();
- return login;
- }
- String[] login = DialogBox.display("Login Dialog", "Enter User Name and Password");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement