git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OptionPanes invokeLater
[jalview.git]
/
src
/
jalview
/
gui
/
Jalview2XML.java
diff --git
a/src/jalview/gui/Jalview2XML.java
b/src/jalview/gui/Jalview2XML.java
index
1f2cbb1
..
b8466f0
100755
(executable)
--- a/
src/jalview/gui/Jalview2XML.java
+++ b/
src/jalview/gui/Jalview2XML.java
@@
-765,7
+765,7
@@
public class Jalview2XML
*
\r
* @param file DOCUMENT ME!
\r
*/
\r
*
\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
jalview.gui.AlignFrame af = null;
\r
try
\r
@@
-820,22
+820,23
@@
public class Jalview2XML
}
\r
catch(java.net.UnknownHostException ex)
\r
{
\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
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
\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
}
\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
\r
//Is Version 1 Jar file?
\r
af = new Jalview2XML_V1().LoadJalviewAlign(file);
\r
@@
-848,11
+849,16
@@
public class Jalview2XML
ex.printStackTrace();
\r
System.err.println("Exception whilst loading jalview XML file : " +
\r
ex + "\n");
\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
\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
}
\r
\r
return af;
\r