private void createStringsHelper(TaskMonitor monitor) {
		int count = 0;
		setStatusText("Creating strings...");
		int txId = program.startTransaction("Create Strings");
		boolean success = false;
		try {
			List<EncodedStringsRow> stringsToCreate = new ArrayList<>();
			int[] selectedRowNums = table.getSelectedRows();
			if (selectedRowNums.length == 0) {
				stringsToCreate.addAll(tableModel.getUnfilteredData());
			}
			else {
				stringsToCreate.addAll(tableModel.getRowObjects(selectedRowNums));
			}

			monitor.initialize(stringsToCreate.size());
			monitor.setMessage("Creating strings...");
			Settings settings = currentOptions.settings();
			List<ProgramLocation> newStrings = new ArrayList<>();
			for (EncodedStringsRow row : stringsToCreate) {
				if (monitor.isCancelled()) {
					break;
				}
				monitor.incrementProgress(1);
				try {
					Data data = DataUtilities.createData(program, row.sdi().getAddress(),
						currentOptions.stringDT(), row.sdi().getDataLength(), false,
						ClearDataMode.CLEAR_ALL_DEFAULT_CONFLICT_DATA);

					// copy settings to new data instance
					for (String settingName : settings.getNames()) {
						Object settingValue = settings.getValue(settingName);
						data.setValue(settingName, settingValue);
					}

					count++;
					newStrings.add(new ProgramLocation(program, row.sdi().getAddress()));
				}
				catch (CodeUnitInsertionException e) {
					Msg.warn(this, "Failed to create string at " + row.sdi().getAddress());
				}
			}
			tool.setStatusInfo("Created %d strings.".formatted(count));
			tableModel.removeRows(stringsToCreate);
			if (selectedRowNums.length > 0 && selectedRowNums[0] < tableModel.getRowCount()) {
				// Re-select the current row after table update to enbiggen the user experience.
				// See table listener for the other end of this
				rowToSelect.set(selectedRowNums[0]);
			}
			StringTranslationService sts = getSelectedStringTranslationService(true);
			if (sts != null) {
				Swing.runLater(
					() -> sts.translate(program, newStrings, new TranslateOptions(true)));
			}
			success = true;
		}
		finally {
			program.endTransaction(txId, success);
		}
	}
For test/screen shot use

@return button
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/strings/EncodedStringsDialog.java