Java Code Examples for javafx.scene.control.Alert#setX()
The following examples show how to use
javafx.scene.control.Alert#setX() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TrexAlertBuilder.java From trex-stateless-gui with Apache License 2.0 | 5 votes |
public TrexAlertBuilder() { alert = new Alert(Alert.AlertType.NONE); alert.getDialogPane().getStyleClass().add("alert-content"); alert.getDialogPane() .getScene() .getStylesheets() .add(TrexApp.class.getResource("/styles/mainStyle.css").toExternalForm()); alert.setX(TrexApp.getPrimaryStage().getX() + ALERT_X_POSITION); alert.setY(TrexApp.getPrimaryStage().getY() + ALERT_Y_POSITION); alert.setHeaderText(null); // header is hidden by default }