文章转载至 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); }}
新闻热点
疑难解答