0

i want to execute a particular set of commands when the program exits by pressing the cross on the right hand top corner

Tushar
  • 3
  • 1

1 Answers1

1

Depending of what you really want to do, there are few ways to do it:
1) If you want to do it on UI level use WindowListener [link]
2) If you want to do it on JVM level, use ShutdownHooks [link]

Op De Cirkel
  • 28,647
  • 6
  • 40
  • 53