[英]Make a JDialog sit until user has disposed properly
I extended JDialog
and made it modal, etc. 我扩展了JDialog
并将其设置为模态等。
How do I make it not return from the dialog until the user has selected OK button or Cancel and the dialog has been disposed? 在用户选择“确定”按钮或“取消”并且处置对话框之前,如何使它不从对话框返回?
I don't want to add a thread and have it spinning. 我不想添加线程并使它旋转。 I just want it to wait until user disposes. 我只希望它等待用户处置。
You can override the setVisible()
function, and check the status before you allow setVisible(false);
您可以覆盖setVisible()
函数,并在允许setVisible(false);
之前检查状态setVisible(false);
. 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.