From: amwaterhouse Date: Thu, 15 Sep 2005 10:08:32 +0000 (+0000) Subject: OptionPane warning for out of memory X-Git-Tag: Release_2_05b~5 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a2fef61921a7ff524851552c18e579fa5051cad4;p=jalview.git OptionPane warning for out of memory --- diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 24d50d4..6627941 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -278,10 +278,18 @@ public class AlignViewport quality.annotations = qannotations; quality.graphMax = cons.qualityRange[1].floatValue(); } - }catch(OutOfMemoryError error) + } + catch (OutOfMemoryError error) { - System.out.println("Out of memory calculating conservation."); + javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop, + "Out of memory calculating conservation!!" + + + "\nSee help files for increasing Java Virtual Machine memory." + , "Out of memory", + javax.swing.JOptionPane.WARNING_MESSAGE); + System.out.println("Conservation calculation: " + error); System.gc(); + } } @@ -358,7 +366,13 @@ public class AlignViewport }catch(OutOfMemoryError error) { - System.out.println("Out of memory calculating consensus."); + javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop, + "Out of memory calculating consensus!!" + + + "\nSee help files for increasing Java Virtual Machine memory." + , "Out of memory", + javax.swing.JOptionPane.WARNING_MESSAGE); + System.out.println("Consensus calculation: " + error); System.gc(); }