public void setCloseOption(int option) {
switch (option) {
case 0:
Window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
break;
case 1:
Window.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
break;
default:
Window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
}
}