首页 > 编程 > Java > 正文

javafx模态窗口

2019-11-06 08:07:42
字体:
来源:转载
供稿:网友

文章转载至   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);	}}


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表