开发者

Close application from task-bar when a modal dialog is opened

开发者 https://www.devze.com 2023-03-22 14:45 出处:网络
When a modal dialog is opened, is there any way to allow user close a JFrame by clicking Close on task-bar icon? I see that even if the dialog is orphan or a child o开发者_运维问答f another frame, it

When a modal dialog is opened, is there any way to allow user close a JFrame by clicking Close on task-bar icon? I see that even if the dialog is orphan or a child o开发者_运维问答f another frame, it still blocks the Close action.


It depends on the native OS you're running on, I don't know of any that do allow you to.

Here is a MSDN listing on it :

http://msdn.microsoft.com/en-us/library/aa969773.aspx

A modal dialog box is displayed by a function when the function needs additional data from a user to continue. Because the function depends on the modal dialog box to gather data, the modal dialog box also prevents a user from activating other windows in the application while it remains open.

0

精彩评论

暂无评论...
验证码 换一张
取 消