Method setDefaultCloseOperation(int operation)
Return type: void
Member of:
javax.swing.JFrame
[
api documentation
] [
main menu
]
Examples of how the element is used
(one line per example):
[
add your own example
]
1
main.setDefaultCloseOperation(3);
2
frame.setDefaultCloseOperation(3);
3
frame.setDefaultCloseOperation(3);
4
frame.setDefaultCloseOperation(3);
5
frame.setDefaultCloseOperation(3);
6
frame.setDefaultCloseOperation(3);
7
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
8
f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
9
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
10
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
11
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
12
setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); // to consider the isClosingAllowed() aspect
13
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
14
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
15
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
16
f.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
17
setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
18
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
19
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
20
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
Java and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other Countries.