OptionPane warning for out of memory
authoramwaterhouse <Andrew Waterhouse>
Thu, 15 Sep 2005 10:08:32 +0000 (10:08 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 15 Sep 2005 10:08:32 +0000 (10:08 +0000)
src/jalview/gui/AlignViewport.java

index 24d50d4..6627941 100755 (executable)
@@ -278,10 +278,18 @@ public class AlignViewport
           quality.annotations = qannotations;\r
           quality.graphMax = cons.qualityRange[1].floatValue();\r
         }\r
-      }catch(OutOfMemoryError error)\r
+      }\r
+      catch (OutOfMemoryError error)\r
       {\r
-        System.out.println("Out of memory calculating conservation.");\r
+        javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+            "Out of memory calculating conservation!!"\r
+            +\r
+            "\nSee help files for increasing Java Virtual Machine memory."\r
+            , "Out of memory",\r
+            javax.swing.JOptionPane.WARNING_MESSAGE);\r
+        System.out.println("Conservation calculation: " + error);\r
         System.gc();\r
+\r
       }\r
     }\r
 \r
@@ -358,7 +366,13 @@ public class AlignViewport
 \r
       }catch(OutOfMemoryError error)\r
       {\r
-        System.out.println("Out of memory calculating consensus.");\r
+        javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+            "Out of memory calculating consensus!!"\r
+            +\r
+            "\nSee help files for increasing Java Virtual Machine memory."\r
+            , "Out of memory",\r
+            javax.swing.JOptionPane.WARNING_MESSAGE);\r
+        System.out.println("Consensus calculation: " + error);\r
         System.gc();\r
       }\r
 \r