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.

Panel in center of Web-page

Filipp Vorontsov
5 years ago Dec 18, 2016 2:49pm
Tobias Demuth
5 years ago Dec 18, 2016 6:26pm

Something like this does the trick:

 

VerticalLayout root = new VerticalLayout():
root.setSizeFull();
root.addComponent(yourPanel);
root.setComponentAlignment(yourPanel, Alignment.MIDDLE_CENTER);