From: amwaterhouse Date: Thu, 17 Aug 2006 10:08:18 +0000 (+0000) Subject: OptionPanes invokeLater X-Git-Tag: Release_2_1~48 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=61505ac1511435b067e647f5c7c9050e5c1eef41;p=jalview.git OptionPanes invokeLater --- diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 1f2cbb1..b8466f0 100755 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -765,7 +765,7 @@ public class Jalview2XML * * @param file DOCUMENT ME! */ - public AlignFrame LoadJalviewAlign(String file) + public AlignFrame LoadJalviewAlign(final String file) { jalview.gui.AlignFrame af = null; try @@ -820,22 +820,23 @@ public class Jalview2XML } catch(java.net.UnknownHostException ex) { - if (Desktop.instance != null) - Desktop.instance.stopLoading(); - ex.printStackTrace(); System.err.println("Couldn't locate Jalview XML file : " + ex + "\n"); - JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Couldn't locate " + file, - "URL not found", - JOptionPane.WARNING_MESSAGE); + javax.swing.SwingUtilities.invokeLater(new Runnable() + { + public void run() + { + JOptionPane.showInternalMessageDialog(Desktop.desktop, + "Couldn't locate " + file, + "URL not found", + JOptionPane.WARNING_MESSAGE); + } + }); } catch (Exception ex) { - if (Desktop.instance != null) - Desktop.instance.stopLoading(); //Is Version 1 Jar file? af = new Jalview2XML_V1().LoadJalviewAlign(file); @@ -848,11 +849,16 @@ public class Jalview2XML ex.printStackTrace(); System.err.println("Exception whilst loading jalview XML file : " + ex + "\n"); - JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Error loading " + file, - "Error loading Jalview file", - JOptionPane.WARNING_MESSAGE); + javax.swing.SwingUtilities.invokeLater(new Runnable() + { + public void run() + { + JOptionPane.showInternalMessageDialog(Desktop.desktop, + "Error loading " + file, + "Error loading Jalview file", + JOptionPane.WARNING_MESSAGE); + }}); } return af; diff --git a/src/jalview/gui/Jalview2XML_V1.java b/src/jalview/gui/Jalview2XML_V1.java index bb5a1ac..d8dfe62 100755 --- a/src/jalview/gui/Jalview2XML_V1.java +++ b/src/jalview/gui/Jalview2XML_V1.java @@ -113,10 +113,8 @@ public class Jalview2XML_V1 for (int i = 0; i < entryCount; i++) { jarentry = jin.getNextJarEntry(); - } - class NoDescIDResolver implements IDResolver { public Object resolve(String idref)