Dimension () { Dimension d = super.getMinimumSize(); JViewport viewport = getViewport(); if (viewport != null) { Component view = viewport.getView(); if (view instanceof Scrollable) { d.width = ((Scrollable)view).getPreferredScrollableViewportSize().width; } if (view != null) { d.width = view.getMinimumSize().width; } } d.height = Math.max(d.height, JBUIScale.scale(400)); return d; }