JAL-3038 corrected code that reads editable JComboBox text input
[jalview.git] / src / jalview / gui / Desktop.java
index 39c68a0..abe1fad 100644 (file)
@@ -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<String>) history).getSelectedItem()
-                        .toString());
+                : ((JComboBox<String>) history).getEditor().getItem()
+                        .toString().trim());
 
         if (url.toLowerCase().endsWith(".jar"))
         {