private static String getTextForLabel(JLabel label) {

		String text = label.getText();
		if (text != null) {
			return text;
		}

		Icon icon = label.getIcon();
		if (icon == null) {
			return null;
		}
		if (icon instanceof ImageIcon) {
			return ((ImageIcon) icon).getDescription();
		}

		return null;
	}
Attempts to get the text value for the cell so that the data will match what the user sees.
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/GTableToCSV.java