简体   繁体   中英

Exit Query for Java program

I would like to make my script run a "Query" method when the exit button on my JFrame is pushed. I tried it with set default close operation but that wont work obviously so what should i do? Thanks!

Why do you say that setDefaultCloseOperiation would not work? Maybe I'm misunderstanding the question, but here is a very similar question on this site.

See if the accepted answer is what you were wanting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM