可以从StageStyle.UNIFIED'更改StageStyle吗? to' StageStyle.UTILITY'当舞台已经活跃时
我的舞台创作代码:
Stage PrimaryStage= new Stage(StageStyle.UTILITY);
Parent root = FXMLLoader.load(getClass().getResource("/InterfacePack/User_Management_Login.fxml"));
Scene scene = new Scene(root);
stage.setTitle("-: Login :-");
PrimaryStage.setScene(scene);
PrimaryStage.show();
我想在以下代码中更改stagestyle:
stage = (Stage) LoginButton.getScene().getWindow();
Parent root = null;
try {
root = FXMLLoader.load(getClass().getResource("/InterfacePack/User_Management_fx.fxml"));
} catch (IOException ex) {
Logger.getLogger(User_Management_LoginController.class.getName()).log(Level.SEVERE, null, ex);
}
Scene scene = new Scene(root);
Toolkit kit = Toolkit.getDefaultToolkit();
Dimension dim = kit.getScreenSize();
stage.setHeight(dim.getHeight());
stage.setWidth(dim.getWidth());
stage.setResizable(false);
stage.setMaximized(true);
stage.setScene(scene);
stage.setTitle("Automation Of Real Estate Construction Company");
stage.show();
我应该如何实施.. ??请帮助..
答案 0 :(得分:2)