0
当试图在HorizontalLayout中设置按钮时,该按钮往往与布局中其他组件的标题部分对齐,而不是与组件本身对齐。例如,HorizontalLayout中的Vaadin按钮对齐
HorizontalLayout hl = new HorizontalLayout();
h1.addComponent(new TextField("Test");
h1.addComponent(new Button("Do Something");
将导致按钮不与文本字段一致,而是与其标题文本对齐。
如何修复对齐使其与文本字段对齐?