文章轉載至 http://www.oschina.net/question/95289_87661
public class StageTest extends application { @Override public void start(Stage PRimaryStage) throws Exception { primaryStage.setWidth(600); primaryStage.setHeight(400); primaryStage.setScene(new Scene(new StackPane())); primaryStage.show(); {// 非模態 Stage stage = new Stage(); stage.setWidth(300); stage.setHeight(200); stage.show(); } {// 模態 Stage stage = new Stage(); stage.initModality(Modality.APPLICATION_MODAL); stage.setWidth(300); stage.setHeight(200); stage.show(); } } public static void main(String[] args) { Application.launch(args); }}
新聞熱點
疑難解答