public static CredentialDialog getHttpProxyCredentialDialog(
     String username, String password, String host, String saveUsernameAndPasswordCheckboxText) {
   CredentialDialog dialog = new CredentialDialog(saveUsernameAndPasswordCheckboxText);
   dialog.prepareForProxyCredentials(username, password);
   dialog.pack();
   return dialog;
 }
 public static CredentialDialog getOsmApiCredentialDialog(
     String username, String password, String host, String saveUsernameAndPasswordCheckboxText) {
   CredentialDialog dialog = new CredentialDialog(saveUsernameAndPasswordCheckboxText);
   if (Objects.equals(OsmApi.getOsmApi().getHost(), host)) {
     dialog.prepareForOsmApiCredentials(username, password);
   } else {
     dialog.prepareForOtherHostCredentials(username, password, host);
   }
   dialog.pack();
   return dialog;
 }