Hi!
I've got a JDialog child popping up at a certain point and absolutely cannot allow users to close it with the upper-right corner cross. How can I catch and stop such attempts?
JDialog's have an operation whereby you set its closing parameter...
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
If you need to check a value before it closes then you will need to invoke a property change listener to handle it. Check out DialogDemo and CustomDialog in the Java tut.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.