当前位置: 技术问答>java相关
java有模态窗口吗?
来源: 互联网 发布时间:2017-03-22
本文导语: 就是弹出以后只有将其关闭才能显示同一程序中的窗体的那种 如果没有,该如何实现??? | 当然有 JDialog public JDialog(Dialog owner, String title, bo...
就是弹出以后只有将其关闭才能显示同一程序中的窗体的那种
如果没有,该如何实现???
如果没有,该如何实现???
|
当然有
JDialog
public JDialog(Dialog owner,
String title,
boolean modal)
Creates a modal or non-modal dialog with the specified title and the specified owner frame.
Parameters:
owner - the Dialog from which the dialog is displayed
title - the String to display in the dialog's title bar
modal - true for a modal dialog, false for one that allows other windows to be active at the same time
JDialog
public JDialog(Dialog owner,
String title,
boolean modal)
Creates a modal or non-modal dialog with the specified title and the specified owner frame.
Parameters:
owner - the Dialog from which the dialog is displayed
title - the String to display in the dialog's title bar
modal - true for a modal dialog, false for one that allows other windows to be active at the same time