String (AbstractButton b, @Nls String text, Icon icon, FontMetrics fm, int width, int height) { textRect.setBounds(0, 0, 0, 0); iconRect.setBounds(0, 0, 0, 0); viewRect.setBounds(0, 0, width, height); modifyViewRect(b, viewRect); // layout the text and icon return SwingUtilities.layoutCompoundLabel( b, fm, text, icon, b.getVerticalAlignment(), b.getHorizontalAlignment(), b.getVerticalTextPosition(), b.getHorizontalTextPosition(), viewRect, iconRect, textRect, StringUtil.isEmpty(text) || icon == null ? 0 : b.getIconTextGap()); }