Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JDialog's cross!!

Status
Not open for further replies.

EugeneG

Technical User
Joined
Oct 2, 2001
Messages
7
Location
US
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.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top