From 4c320f686dbef4a6eba8bc5de201cf86c5f2d6ac Mon Sep 17 00:00:00 2001 From: Mayank Sharma Date: Mon, 31 Mar 2014 16:15:54 +0530 Subject: [PATCH] issue#85 short approach - setDefaultCloseOperation --- jme3-examples/src/main/java/jme3test/TestChooser.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/jme3-examples/src/main/java/jme3test/TestChooser.java b/jme3-examples/src/main/java/jme3test/TestChooser.java index 043c3e6d5..a2251945e 100644 --- a/jme3-examples/src/main/java/jme3test/TestChooser.java +++ b/jme3-examples/src/main/java/jme3test/TestChooser.java @@ -87,13 +87,7 @@ public class TestChooser extends JDialog { /** This listener ends application when window is closed (x button on top right corner of test chooser). * @see issue#85 https://github.com/jMonkeyEngine/jmonkeyengine/issues/85 */ - addWindowListener(new WindowAdapter(){ - @Override - public void windowClosing(WindowEvent e) - { - dispose(); - } - }); + setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); } /**