Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
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)
Ah! That badge is actually just a Label that is aligned over the button with CSS.
-Olli