From: amwaterhouse Date: Tue, 25 Jan 2005 17:11:52 +0000 (+0000) Subject: system.exit or destroy if applet or app X-Git-Tag: Release_2_0~719 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=028bc343135a72515c6b109eb0deb8d6034ca520;p=jalview.git system.exit or destroy if applet or app --- diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 69fd7b0..f23bcc9 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -52,11 +52,11 @@ public class Jalview extends JApplet public void destroy() { - System.out.println("Goodbyeee"); - - applet.stop(); + if(applet!=null) + applet.stop(); + else + System.exit(0); frame.setVisible(false); - } public static void main(String[] args) { diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index d79f472..b0f000e 100755 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -223,7 +223,10 @@ public class Desktop extends jalview.jbgui.GDesktop */ public void quit_actionPerformed(ActionEvent e) { - jalview.bin.Jalview.applet.destroy(); + if(jalview.bin.Jalview.applet!=null) + jalview.bin.Jalview.applet.destroy(); + else + System.exit(0); }