private int getRow(GTable table, String programName) {
		return runSwing(() -> {
			int n = table.getRowCount();
			TableColumn column = table.getColumn("Name");
			int index = column.getModelIndex();
			TableModel model = table.getModel();
			for (int row = 0; row < n; row++) {
				Object value = model.getValueAt(row, index);
				if (Objects.equals(programName, value)) {
					return row;
				}
			}
			return -1;
		});
	}
Tests for actions in the front end (Ghidra project window)
Ghidra/Features/Base/src/test.slow/java/ghidra/framework/main/datatree/FrontEndPluginActionsTest.java