How can a Swing WindowListener veto JFrame closing

后端 未结 4 1061
北恋
北恋 2020-11-30 14:03

I have a frame, and want to prompt when the user closes it to save the document. But if they cancel, the frame shouldn\'t close.

frame.addWindowListener(new          


        
4条回答
提交回复
热议问题