Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int result = JOptionPane.showConfirmDialog(this, "Exit?", "Exit", 0);
- if(result != 0){
- this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
- } else {
- this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement