}\r
catch (OutOfMemoryError error)\r
{\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
+ javax.swing.SwingUtilities.invokeLater(new Runnable()\r
+ {\r
+ public void run()\r
+ {\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
+ }\r
+ });\r
+\r
System.out.println("Conservation calculation: " + error);\r
System.gc();\r
\r
\r
}catch(OutOfMemoryError error)\r
{\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
+ javax.swing.SwingUtilities.invokeLater(new Runnable()\r
+ {\r
+ public void run()\r
+ {\r
+ javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ "Out of memory calc45ulating consensus!!"\r
+ +\r
+ "\nSee help files for increasing Java Virtual Machine memory."\r
+ , "Out of memory",\r
+ javax.swing.JOptionPane.WARNING_MESSAGE);\r
+ }\r
+ });\r
+\r
+\r
System.out.println("Consensus calculation: " + error);\r
System.gc();\r
}\r
\r
}\r
\r
- void showErrorMessage(String error)\r
+ void showErrorMessage(final String error)\r
{\r
resetDialog();\r
- JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
- error, "Error Retrieving Data",\r
+ javax.swing.SwingUtilities.invokeLater(new Runnable()\r
+ {\r
+ public void run()\r
+ {\r
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ error, "Error Retrieving Data",\r
JOptionPane.WARNING_MESSAGE);\r
- return;\r
+ }\r
+ });\r
}\r
}\r
\r