Why panel.setLayout is deprecated ? what is the best pratice now ?

Hi I find it very useful to be able to be able to set layout of a panel in swing etc…

now I see that in Vaadin you have that but it’s deprecated, why ?

What should be the aproach if you need a horizontalLayout in a Panel ?

Thanks !

Use Panel#setContent(ComponentContainer) instead (panel#setLayout already simply delegates to #setContent).

I suspect the reasoning for the deprecation is that any Layout can be a componentContainer, but there are other containers that are not Layouts (e.g. TabSheet, SplitPane etc) which you may want to use as a root component.

Cheers,

Charles