0
當試圖在HorizontalLayout中設置按鈕時,該按鈕往往與佈局中其他組件的標題部分對齊,而不是與組件本身對齊。例如,HorizontalLayout中的Vaadin按鈕對齊
HorizontalLayout hl = new HorizontalLayout();
h1.addComponent(new TextField("Test");
h1.addComponent(new Button("Do Something");
將導致按鈕不與文本字段一致,而是與其標題文本對齊。
如何修復對齊使其與文本字段對齊?