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.
Button.STYLE_LINK
Hi Joonas,
I tried the same example as this, but my application for some reason not recognising the style for the button at all, b.setStyleName("link") or b.setStyleName("Button.STYLE_LINK") is not working as intended. Please help.
Thanks
shubha thirthahalli: I tried the same example as this, but my application for some reason not recognising the style for the button at all, b.setStyleName("link") or b.setStyleName("Button.STYLE_LINK") is not working as intended. Please help.
Define the STYLE_LINK without quotes, like this:
b.setStyleName(Button.STYLE_LINK);
Button.setStyleName("link") should work equally well as Button.setStyleName(Button.STYLE_LINK).
Be sure that you do not call setStyleName again for the same button later, that will replace all previous styles. You could use Button.addStyleName instead.