Reputation: 4305
I have created a JFrame and I would like to associate a specific behaviour when this JFrame is closed. Is it possible?
Upvotes: 2
Views: 738
Reputation: 74557
You can setDefaultCloseOperation or add a WindowListener.
setDefaultCloseOperation
WindowListener