From: amwaterhouse Date: Fri, 18 Nov 2005 09:59:46 +0000 (+0000) Subject: Show error message outside thread loop X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4232f0a5699af84c5361e6cea446a97e7bcc788e;p=jalview.git Show error message outside thread loop --- diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index adadf14..e8f4abf 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -165,7 +165,7 @@ public class SequenceFetcher } } - if (result.length() > 0 && error!=null) + if (result.length() > 0 && error==null) { String format = IdentifyFile.Identify(result.toString(), "Paste"); SequenceI[] sequences = null; @@ -234,17 +234,23 @@ public class SequenceFetcher } } + if(error!=null) + showErrorMessage(error); + database.setEnabled(true); textfield.setEnabled(true); ok.setEnabled(true); cancel.setEnabled(true); frame.setTitle("Sequence Fetcher"); - if(error!=null) - JOptionPane.showInternalMessageDialog(Desktop.desktop, - error, "Error Retrieving Data", JOptionPane.WARNING_MESSAGE); } + + void showErrorMessage(String error) + { + JOptionPane.showInternalMessageDialog(Desktop.desktop, + error, "Error Retrieving Data", JOptionPane.WARNING_MESSAGE); + } }