*\r
* @param file DOCUMENT ME!\r
*/\r
- public AlignFrame LoadJalviewAlign(String file)\r
+ public AlignFrame LoadJalviewAlign(final String file)\r
{\r
jalview.gui.AlignFrame af = null;\r
try\r
}\r
catch(java.net.UnknownHostException ex)\r
{\r
- if (Desktop.instance != null)\r
- Desktop.instance.stopLoading();\r
-\r
ex.printStackTrace();\r
System.err.println("Couldn't locate Jalview XML file : " +\r
ex + "\n");\r
- JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
- "Couldn't locate " + file,\r
- "URL not found",\r
- JOptionPane.WARNING_MESSAGE);\r
\r
+ javax.swing.SwingUtilities.invokeLater(new Runnable()\r
+ {\r
+ public void run()\r
+ {\r
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ "Couldn't locate " + file,\r
+ "URL not found",\r
+ JOptionPane.WARNING_MESSAGE);\r
+ }\r
+ });\r
}\r
catch (Exception ex)\r
{\r
- if (Desktop.instance != null)\r
- Desktop.instance.stopLoading();\r
\r
//Is Version 1 Jar file?\r
af = new Jalview2XML_V1().LoadJalviewAlign(file);\r
ex.printStackTrace();\r
System.err.println("Exception whilst loading jalview XML file : " +\r
ex + "\n");\r
- JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
- "Error loading " + file,\r
- "Error loading Jalview file",\r
- JOptionPane.WARNING_MESSAGE);\r
+ javax.swing.SwingUtilities.invokeLater(new Runnable()\r
+ {\r
+ public void run()\r
+ {\r
\r
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ "Error loading " + file,\r
+ "Error loading Jalview file",\r
+ JOptionPane.WARNING_MESSAGE);\r
+ }});\r
}\r
\r
return af;\r