Anto
Anto

Reputation: 4305

adding behavior when closing a JFrame

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

Answers (1)

Josef Pfleger
Josef Pfleger

Reputation: 74557

You can setDefaultCloseOperation or add a WindowListener.

Upvotes: 2

Related Questions