소스 검색

issue#85 short approach - setDefaultCloseOperation

Mayank Sharma 11 년 전
부모
커밋
4c320f686d
1개의 변경된 파일1개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 7
      jme3-examples/src/main/java/jme3test/TestChooser.java

+ 1 - 7
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);
     }
 
     /**