tags:

views:

51

answers:

1

Hello everyone, 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 JDialog.DISPOSE_ON_CLOSE.

+2  A: 

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

disown