public String getDirectory() {
        if (!enabled) {
            return "";
        }
        Object selection = directoryCombo.getSelectedItem();
        if (selection != null) {
            String strSelection = selection.toString();
            int itemCount = directoryCombo.getItemCount();
            boolean containsIt = false;
            for (int i = 0; i < itemCount; ++i) {
                if (directoryCombo.getItemAt(i).toString().trim().equals(strSelection)) {
                    containsIt = true;
                }
            }
            if (!containsIt) {
                directoryCombo.insertItemAt(strSelection, 0);
            }
            return strSelection;
        }
        return null;
    }