1
主窗口的场景中有一个按钮。当它被点击,创建新的窗口,按照下面的代码:如何在JavaFX中阻止主窗口
public static void create()
{
Stage stage = new Stage();
AnchorPane pane = new AnchorPane();
//Here i add some into pane
stage.setScene(new Scene(pane));
stage.setWidth(500);
stage.setHeight(600);
stage.show();
}
我想在主窗口,解除封锁(即用户将无法点击按钮,输入文字,调整或与其他方式进行交互),直到附加窗口关闭。
https://docs.oracle.com/javase/9/docs/api/javafx/stage/Stage.html#initModality-javafx.stage.Modality- –