Dimension iconD = icon.getPreferredSize(); Dimension textD = text.getPreferredSize();
Dimension iconD = _icon.getPreferredSize(); Dimension textD = _text.getPreferredSize();
    public Dimension getPreferredSize() {        Dimension iconD = icon.getPreferredSize();        Dimension textD = text.getPreferredSize();        int height = iconD.height < textD.height ?        textD.height : iconD.height;        return new Dimension(iconD.width + textD.width, height);    }