X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FOOMWarning.java;h=dc5d0f5232ae2e8997c001476fd88b3a76f226f5;hb=1cec732f963ab102c9d8381203df8c8cba2a9ee4;hp=319c28376fcd2816728a7ab429cbe6006e3fb41b;hpb=ad15cff29620f960119f80176f1fd443da9f6763;p=jalview.git diff --git a/src/jalview/gui/OOMWarning.java b/src/jalview/gui/OOMWarning.java index 319c283..dc5d0f5 100644 --- a/src/jalview/gui/OOMWarning.java +++ b/src/jalview/gui/OOMWarning.java @@ -56,8 +56,8 @@ public class OOMWarning implements Runnable { if (jalview.bin.Cache.log != null) { - jalview.bin.Cache.log - .error("Out of Memory when " + action, oomex); + jalview.bin.Cache.log.error("Out of Memory when " + action, + oomex); } else { @@ -72,19 +72,18 @@ public class OOMWarning implements Runnable public OOMWarning(String string, OutOfMemoryError oomerror) { - this(string, oomerror, Desktop.desktop); + this(string, oomerror, Desktop.getDesktopPane()); } + @Override public void run() { - javax.swing.JOptionPane - .showInternalMessageDialog( - desktop, - MessageManager.formatMessage("warn.out_of_memory_when_action", new String[]{action}), - MessageManager.getString("label.out_of_memory"), - javax.swing.JOptionPane.WARNING_MESSAGE); - // hope that there's enough memory left that no more appear. oomInprogress = false; + JvOptionPane.showInternalMessageDialog(desktop, MessageManager + .formatMessage("warn.out_of_memory_when_action", new String[] + { action }), MessageManager.getString("label.out_of_memory"), + JvOptionPane.WARNING_MESSAGE); + // hope that there's enough memory left that no more appear. } }