void (@NotNull PropertiesComponent propertyComponent, @NotNull String prefix, @NotNull JTable table) { TableColumnModel model = table.getTableHeader().getColumnModel(); int columnCount = model.getColumnCount(); boolean[] storedColumns = new boolean[columnCount]; Arrays.fill(storedColumns, false); for (int i = 0; i < columnCount; i++) { TableColumn column = model.getColumn(i); propertyComponent.setValue(prefix + widthPropertyName(i), String.valueOf(column.getWidth())); int modelIndex = column.getModelIndex(); propertyComponent.setValue(prefix + orderPropertyName(i), String.valueOf(modelIndex)); if (storedColumns[modelIndex]) { LOG.error("columnCount: " + columnCount + " current: " + i + " modelINdex: " + modelIndex); } storedColumns[modelIndex] = true; } }