private String generateText(List<FieldElement> elements, String delimiter) {

		StringBuilder buf = new StringBuilder();
		int n = elements.size() - 1;
		for (int i = 0; i < n; i++) {
			String text = elements.get(i).getText();
			buf.append(text);
			if (!text.endsWith(delimiter)) { // prevent 2 spaces between merged lines
				buf.append(delimiter);
			}
		}
		buf.append(elements.get(n).getText());
		return buf.toString();
	}
This constructor will create a text field from an array of FieldElements, putting each
element on its own line.

@param textElements the FieldElements to display
@param startX  the x position to draw the element
@param width   the max width allocated to this field
@param maxLines the max number of lines to display
@param hlFactory the highlight factory
@param rowSeparator The string used to space lines of text when concatenated by the
       getText() method.
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/VerticalLayoutTextField.java