From 4232f0a5699af84c5361e6cea446a97e7bcc788e Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 18 Nov 2005 09:59:46 +0000 Subject: [PATCH] Show error message outside thread loop --- src/jalview/gui/SequenceFetcher.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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); + } } -- 1.7.10.2