diff --git a/platform-independent/java/gui/src/main/java/com/lyndir/masterpassword/gui/util/Components.java b/platform-independent/java/gui/src/main/java/com/lyndir/masterpassword/gui/util/Components.java index 662f768f..662c983e 100644 --- a/platform-independent/java/gui/src/main/java/com/lyndir/masterpassword/gui/util/Components.java +++ b/platform-independent/java/gui/src/main/java/com/lyndir/masterpassword/gui/util/Components.java @@ -243,6 +243,9 @@ public abstract class Components { return this; } } ); + Dimension cellSize = getCellRenderer().getListCellRendererComponent( this, null, 0, false, false ).getPreferredSize(); + setFixedCellWidth( cellSize.width ); + setFixedCellHeight( cellSize.height ); if (model instanceof CollectionListModel) ((CollectionListModel) model).registerList( this );