From a2fef61921a7ff524851552c18e579fa5051cad4 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 15 Sep 2005 10:08:32 +0000 Subject: [PATCH] OptionPane warning for out of memory --- src/jalview/gui/AlignViewport.java | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) 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(); } -- 1.7.10.2