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.
The simplest way would be just changing the icon in the buttonClick method of the ClickListener. E.g. like the following. final Button myButton = new Button ("A bug");myButton.setIcons(VaadinIcons.BUG);myButton.addClickListener(new Button.ClickListner() { public void buttonClick(ClickEvent e) { myButton.setIcon(VaadinIcons.BUG_O); }}