private void changePassword() {
		BSimServerInfo serverInfo = serverTable.getSelectedRowObject();
		if (serverInfo == null) {
			return;
		}
		char[] pwd = null;
		try (FunctionDatabase db = BSimClientFactory.buildClient(serverInfo, true)) {
			if (!db.initialize()) {
				// TODO: Need standardized error handler
				BSimError lastError = db.getLastError();
				if (lastError.category != ErrorCategory.AuthenticationCancelled) {
					Msg.showError(this, getComponent(), "BSim DB Connection Failed",
						lastError.message);
				}
				return;
			}
			if (!db.isPasswordChangeAllowed()) {
				Msg.showError(this, getComponent(), "Unsupported Operation",
					"BSim DB password change not supported");
				return;
			}
			PasswordChangeDialog dlg = new PasswordChangeDialog("Change Password", "BSim DB",
				serverInfo.toString(), db.getUserName());
			tool.showDialog(dlg);
			pwd = dlg.getPassword();
			if (pwd == null) {
				return; // password dialog entry cancelled by user
			}

			String resp = db.changePassword(pwd);
			if (resp == null) {
				Msg.showInfo(this, getComponent(), "Password Changed",
					"BSim DB password successfully changed");
			}
			else {
				Msg.showError(this, getComponent(), "Password Changed Failed", resp);
			}
		}
		finally {
			if (pwd != null) {
				Arrays.fill(pwd, '\0');
			}
		}
	}
Dialog for managing BSim database server definitions
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/search/dialog/BSimServerDialog.java