diff --git a/platform/platform-api/src/com/intellij/ui/CellRendererPanel.java b/platform/platform-api/src/com/intellij/ui/CellRendererPanel.java index c2944458ba11..23da6bbab3bf 100644 --- a/platform/platform-api/src/com/intellij/ui/CellRendererPanel.java +++ b/platform/platform-api/src/com/intellij/ui/CellRendererPanel.java @@ -103,7 +103,7 @@ public class CellRendererPanel extends JPanel { @Override public Dimension getPreferredSize() { - if (getComponentCount() != 1) { + if (getComponentCount() != 1 || getBorder() != null) { return super.getPreferredSize(); } return getComponent(0).getPreferredSize();