How to set alignment in Vaadin HorizontalLayout to vertical centered?

Viewed 343

How can I get the Icon and the Text centered in vertical alignment inside a Vaadin HorizontalLayout?

This code isn't working:

HorizontalLayout horizontalLayout = new HorizontalLayout(VaadinIcon.EXCLAMATION_CIRCLE_O.create(),new H5("Achtung - Bitte aufmerksam lesen!") );
            horizontalLayout.setAlignItems(FlexComponent.Alignment.CENTER);

enter image description here

1 Answers
Related