Avatar of 4eyesgirl
4eyesgirl
 asked on

Perform task whenever user close the frame

Expert,

I need to know how to catch the action when user click on the "X" in in a Frame....In other word, I want to perform a task whenever a user close a frame.  

How to do it?  Need example, please!
JavaProgramming Languages-Other

Avatar of undefined
Last Comment
CEHJ

8/22/2022 - Mon
CEHJ

You just need to add a WindowListener to the frame and implement windowClosing
4eyesgirl

ASKER
Example code please.
ASKER CERTIFIED SOLUTION
CEHJ

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
CEHJ

:-)
Your help has saved me hundreds of hours of internet surfing.
fblack61