public class ClientGUI extends Application { @Override public void start(Stage stage) throws Exception { Parent root = FXMLLoader.load(getClass().getResource("ClientGUI.fxml")); scene = new Scene(root, 480, 360); stage.setTitle("MyMessenger"); stage.setScene(scene); stage.setMinWidth(660); stage.setMinHeight(495); stage.setMaxWidth(990); stage.show(); } }
@Override public void start(Stage primaryStage) { BorderPane root = new BorderPane(); primaryStage.setMinWidth(200); primaryStage.setMaxWidth(400); Scene scene = new Scene(root,400,400); primaryStage.setScene(scene); primaryStage.show(); }
Stage stage = new Stage(); stage.initStyle(StageStyle.UTILITY); stage.setMaxHeight(0); stage.setMaxWidth(0); stage.setX(Double.MAX_VALUE);
stage.setMaxWidth(MAXIMUM_WINDOW_WIDTH); stage.setMaxHeight(MAXIMUM_WINDOW_HEIGHT);
b4.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { //Before open a add effect here anchpane.setEffect(new BoxBlur(5, 10, 10)); // anchpane is anchor pane of main stage. change values of efect according your need. you can use any kind of pane of scene. Stage usrpagestage = new Stage(); usrpagestage.setMaxHeight(160); usrpagestage.setMaxWidth(210); usrpagestage.setResizable(false); usrpagestage.initStyle(StageStyle.UTILITY); usrpagestage.setScene(new Scene(new About())); usrpagestage.show(); } });
toolbar.setMaxWidth(125); //to prevent excessive re-sizing; you could change to your likeness toolbar.setMinWidth(120); //to prevent excessive re-sizing; you could change to your likeness toolbar.setX((Screen.getPrimary().getVisualBounds().getMaxX()-130));
public void show(boolean autoHide) { Platform.runLater(() -> { _beforeShow(); Stage dialogStage = dialogStageWrapper.getDialogStage(); dialogStage.setMinWidth(340); dialogStage.setMaxWidth(340); if(hideFooter) { dialogStage.setMinHeight(164); dialogStage.setMaxHeight(164); } else { dialogStage.setMinHeight(236); dialogStage.setMaxHeight(236); } if(autoHide) { dialogStageWrapper.show(autoHide); } else { dialogStageWrapper.show(); } }); }
primaryStage.setMaxWidth(500); primaryStage.setMinWidth(400);
primaryStage().setMaxWidth(mx);
stage.setMaxWidth(region.getMaxWidth());