vaadin12: one button left, on button right in one line

I have a dialog and i want to have on the top of this dialog in one line one button on left side and the other botton on right side

Button leftButton = new Button();
Button rightButton = new Button();

Div topBar = new Div(leftButton, rightButton)

How can i set the alignment of these two Buttons?

Try the HorizontalLayount instead of div and set the margin-left property of the second button style to auto, this will do the trick.


now it works.