private void setDefaultText(final JFormattedTextField textField, final String defaultName) {
    String lastValid = "";
    for (int i = 0; i < defaultName.length(); ++i) {
      String current = textField.getText();

      if (current.equals("")) {
        current = lastValid + defaultName.charAt(i);
      } else {
        current += defaultName.charAt(i);
      }

      textField.setText(current);
      if (!textField.getText().equals("")) {
        lastValid = current;
      }
    }
  }
Save dialog for function diff views.
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/dialogs/SaveFunctionDiffViewDialog.java