Dimension arrowDim = arrowButton.getPreferredSize(); Dimension result = new Dimension(d.width + arrowDim.width, Math.max(d.height, arrowDim.height));
int arrowButtonWidth = d.height; Dimension result = new Dimension(d.width + arrowButtonWidth, d.height);
  public Dimension getMinimumSize(JComponent c)  {    Dimension d = getDisplaySize();    Dimension arrowDim = arrowButton.getPreferredSize();    Dimension result = new Dimension(d.width + arrowDim.width,             Math.max(d.height, arrowDim.height));    return result;  }