Created
January 4, 2018 11:06
-
-
Save alamenai/37a231be1b4f67fc0fa451682da0d611 to your computer and use it in GitHub Desktop.
simple code to show a dialog using JFXDialog of @jfoenix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void showJDialog() { | |
JFXDialogLayout dialogContent = new JFXDialogLayout(); | |
dialogContent.setHeading(new Text("Hello" == null ? "good" : "good" + "\n" + "Hello")); | |
dialogContent.setBody(new Text("Body")); | |
JFXButton close = new JFXButton("Close"); | |
dialogContent.setActions(close); | |
JFXDialog dialog = new JFXDialog((StackPane) loginstage.getScene().getRoot(), dialogContent, JFXDialog.DialogTransition.CENTER); | |
close.setOnAction(new EventHandler<ActionEvent>() { | |
@Override | |
public void handle(ActionEvent __) { | |
dialog.close(); | |
} | |
}); | |
dialog.show(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment