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.
Change the background color of the Layout when clicked on it
Hi
I have a Vertical layout inside a table column. I use Column generators to generate the table cell. Now the layout has a Layoutclick event listener attached to it.
I want to change the background color of the layout when it is clicked upon. I searched in vaadin forums but could not find any thing to go ahead about this issue.
Any help is greatly appreciated
Regards
Ajay
1) Create a custom theme if you don't have one.
2) Create a style name with the background-color property set to the color you want.
3) Use layout.addStyleName with the name you just created in the clicklistener.