diff --git a/platform/platform-api/src/com/intellij/ui/table/JBTable.java b/platform/platform-api/src/com/intellij/ui/table/JBTable.java index 919317277b8a..9b6201ecf345 100644 --- a/platform/platform-api/src/com/intellij/ui/table/JBTable.java +++ b/platform/platform-api/src/com/intellij/ui/table/JBTable.java @@ -741,7 +741,8 @@ public class JBTable extends JTable implements ComponentWithEmptyText, Component TableColumn column = getColumnModel().getColumn(columnToPack); int currentWidth = column.getWidth(); int expandedWidth = getExpandedColumnWidth(columnToPack); - int newWidth = currentWidth >= expandedWidth ? getPreferredHeaderWidth(columnToPack) : expandedWidth; + int newWidth = getColumnModel().getColumnMargin() + + (currentWidth >= expandedWidth ? getPreferredHeaderWidth(columnToPack) : expandedWidth); setResizingColumn(column); column.setWidth(newWidth);