private void setDefaultColumnsVisible() {

		TableModel tableModel = table.getUnwrappedTableModel();

		// Assumption: normal table models already have their table columns visible
		List<TableColumn> columnList = columnModel.getAllColumns();
		if (tableModel instanceof VariableColumnTableModel) {
			VariableColumnTableModel variableModel = (VariableColumnTableModel) tableModel;
			int numVisible = 0;
			for (TableColumn column : columnList) {
				int modelIndex = column.getModelIndex();
				boolean isVisible = variableModel.isVisibleByDefault(modelIndex);
				columnModel.setVisible(column, isVisible);
				if (isVisible) {
					numVisible++;
				}
			}

			if (numVisible == 0) { // Make sure at least one column is visible.
				columnModel.setVisible(columnList.get(0), true);
			}
		}

		setDefaultPreferredColumnSizes();
	}
This method will return a string key that uniquely describes a table model and its
*default* columns (those initially added by the model) so that settings for column state
can be persisted and retrieved.
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/TableColumnModelState.java