From: gmungoc Date: Thu, 21 Jan 2021 17:18:06 +0000 (+0000) Subject: JAL-3038 corrected code that reads editable JComboBox text input X-Git-Tag: Develop-2_11_2_0-d20210205~5 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=26627ab5662fce527947aee751d39ea26e3acdf1 JAL-3038 corrected code that reads editable JComboBox text input --- diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 39c68a0..abe1fad 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -1192,7 +1192,7 @@ public class Desktop extends jalview.jbgui.GDesktop panel.add(label); /* - * the URL to fetch is + * the URL to fetch is input in * Java: an editable combobox with history * JS: (pending JAL-3038) a plain text field */ @@ -1235,8 +1235,8 @@ public class Desktop extends jalview.jbgui.GDesktop @SuppressWarnings("unchecked") String url = (history instanceof JTextField ? ((JTextField) history).getText() - : ((JComboBox) history).getSelectedItem() - .toString()); + : ((JComboBox) history).getEditor().getItem() + .toString().trim()); if (url.toLowerCase().endsWith(".jar")) {