end application when TestChooser dialog is closed

added a WindowListener in the constructor that overrides the windowsClosing method to dispose the TestChooser dialog. 
code tested with positive result for issue#85.
This commit is contained in:
Mayank Sharma 2014-03-29 16:40:12 +05:30
parent 7b0c31afad
commit 5b84be227a

View File

@ -84,6 +84,16 @@ public class TestChooser extends JDialog {
*/
public TestChooser() throws HeadlessException {
super((JFrame) null, "TestChooser");
/** 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();
}
});
}
/**