how to add a badge to a button ?

How to add badge to a button (like the bell button in vaadin dashborad demo) ? I couldn’t get it to work

Thanks

Hi,

you can use the setIcon method of Button to do that. See some examples here:
https://dev.vaadin.com/svn/branches/jounis-layout-protos/demo/src/com/vaadin/demo/sampler/features/commons/IconsExample.java

Thanks but setIcon won’t add the icon over the button.
I am looking for a solution for something similar to the attached image
(see attached image)
28009.png

Ah! That badge is actually just a Label that is aligned over the button with CSS.

-Olli