Component (@NotNull TableCellRenderer renderer, int row, int column) { Component component = super.prepareRenderer(renderer, row, column); if (myAutoResize) { getPreferredSize().width = updateColumnWidth(column, component.getPreferredSize().width, this); } else { getColumnModel().getColumn(0).setPreferredWidth(50); } setPreferredScrollableViewportSize(getPreferredSize()); return component; }