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
精彩评论