private void addStringToList() {
        String str = textField.getText();

        // string must not be empty or contain the separator string or contain an extension already listed
        if (str != null && str.length() > 0 && !str.contains(SEPARATOR) && !Arrays.asList(list.getItems()).contains(str)) {
            list.add(str);
            textField.setText("");
        }
    }