如果要直接使用VerticalPanelfrom代码,则需要使用setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE)
您也可以使用UiBinder方法
<g:VerticalPanel verticalAlignment='ALIGN_MIDDLE' horizontalAlignment='ALIGN_CENTER' width="100%" height="500px">
<g:cell></g:cell>
</g:VerticalPanel>
Run Code Online (Sandbox Code Playgroud)
请查看DevGuideUiPanels的示例和文档