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
*/
@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"))
{