diff --git a/src/main/java/org/janelia/saalfeldlab/n5/ui/ImprovedFormattedTextField.java b/src/main/java/org/janelia/saalfeldlab/n5/ui/ImprovedFormattedTextField.java index ef4ec10b..ae89d386 100644 --- a/src/main/java/org/janelia/saalfeldlab/n5/ui/ImprovedFormattedTextField.java +++ b/src/main/java/org/janelia/saalfeldlab/n5/ui/ImprovedFormattedTextField.java @@ -67,8 +67,9 @@ public ImprovedFormattedTextField(AbstractFormatter formatter) { public ImprovedFormattedTextField(AbstractFormatter formatter, Object aValue) { this(formatter); + String strValue = aValue instanceof String ? (String)aValue : ""; try { - setValue(new URI("")); + setValue(new URI(strValue)); } catch (URISyntaxException e) { e.printStackTrace(); }