Loading...
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.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Div vs FlexLayout

Zac Harvey
3 years ago Jul 04, 2019 11:48am
Olli Tietäväinen
3 years ago Jul 04, 2019 12:17pm

FlexLayout has some server-side Java methods for setting FlexBox properties. You can set the same properties through CSS as well, if that's what you prefer. If you like to minimize the CSS stylings in your app, then in that case FlexLayout is better. FlexLayout also extends Component, which comes with its own helper methods, like getChildren(), onAttach(), onDetach() and so on.

Zac Harvey
3 years ago Jul 05, 2019 1:06pm
Olli Tietäväinen
3 years ago Jul 05, 2019 1:38pm
Zac Harvey
3 years ago Jul 05, 2019 1:43pm
Olli Tietäväinen
3 years ago Jul 06, 2019 5:18am
Zac Harvey
3 years ago Jul 11, 2019 2:37am
Olli Tietäväinen
3 years ago Jul 11, 2019 5:34am

Sure. It's all about the server-side Java API, like I mentioned in my first response. A Div is a plain element with only element-related things, like css class names. A Layout component has Java methods for setting layouting-related features.