Try
<g:HTMLPanel ui:field="temp">
<div align="center">
<g:HorizontalPanel ui:field="hPanel"/>
<g:Button ui:field="submitButton" text="Submit" />
<g:VerticalPanel ui:field="newPanel" />
</div>
</g:HTMLPanel>
and
// TempView.java
...
@UiField
HorizontalPanel hPanel;
public void setVerticalPanel(VerticalPanel v) {
hPanel.add(v);
}
Or set the panel in the view constructor before calling
initWidget(uiBinder.createAndBindUi(this));