Adding a component to a Panel title

Hello,

I would have to have a Twitter timeline panel on my application. I have everything working, except that I would like to have a “follow” button at the right of the title bar. Since there is no “setHeader”-like method on the Panel class, do you know how could I do this, using themes and/or Java ?

Thanks !

Instead of having a caption for the Panel, you could have a HorizontalLayout that contains a Label for the caption and the follow Button. Then you can add the HorizontalLayout and Panel inside a VerticalLayout and style it look correct.

There is one such example here:
http://demo.vaadin.com/valo-theme/#!panels

Source:
https://github.com/vaadin/valo-demo/blob/master/src/main/java/com/vaadin/tests/themes/valo/Panels.java#L102

Thanks :slight_smile: