开发者

how to know if JDialog is closed or not?

I have used a JDialog to display a form ( I could have used JFrame, but I have my reasons). There is an event in my application that will cause a function to generate and display the said JDialog. Now, I want to know if the user has closed that JDialog. How do I find this out?

P.S. My defaultCloseOperation is 开发者_Go百科JDialog.DISPOSE_ON_CLOSE.


Register a window listener on the dialog, and implement the windowClosed method, see The Java Tutorial on Window Listeners

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜