diff options
Diffstat (limited to 'Dozentenmodul/src/GUI/ActionChooser.java')
| -rw-r--r-- | Dozentenmodul/src/GUI/ActionChooser.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Dozentenmodul/src/GUI/ActionChooser.java b/Dozentenmodul/src/GUI/ActionChooser.java index 71f1be92..7e65b673 100644 --- a/Dozentenmodul/src/GUI/ActionChooser.java +++ b/Dozentenmodul/src/GUI/ActionChooser.java @@ -21,6 +21,8 @@ import javax.swing.ButtonGroup; import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
@SuppressWarnings("serial")
public class ActionChooser extends JDialog {
@@ -36,7 +38,7 @@ public class ActionChooser extends JDialog { public static void main(String[] args) {
try {
ActionChooser dialog = new ActionChooser();
- dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
dialog.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
@@ -47,6 +49,12 @@ public class ActionChooser extends JDialog { * Create the dialog.
*/
public ActionChooser() {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent arg0) {
+ System.exit(0);
+ }
+ });
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException
|
