Struggling with button size!

Hi,

I keep struggling with setting the size of a button.

I’ve square icons (e.g. 32x32px) that I want to use in the
setIcon
method of the Button component. Setting the icon works okay, but how can I make the button be square in size e.g. 40x40px, with the icon centered?

Setting the height and width using
setHeigth
and
setWidth
does’t seem to work! Currently using version 7.5.9!

Any idea how to tackle this issue?

Regards,
Gerard

This should do it (using the Valo theme).

Button btn = new Button();
btn.setIcon(FontAwesome.CHECK);
btn.addStyleName(ValoTheme.BUTTON_ICON_ONLY);
btn.setHeight("40px");
btn.setWidth("40px");