In order to use a set of widgets in a ui.xml template file, you need to tie their package to an XML namespace prefix. That’s what’s happening in this attribute of the root <ui:uibinder> element: xmlns:g='urn:import:com.google.gwt.user.client.ui'. This says that every class in the com.google.gwt.user.client.ui package can be used as an element with prefix g and a tag name matching its Java class name, like <g:ListBox>.
See how the g:ListBox element has a visibleItemCount='1' attribute? That becomes a call to ListBox#setVisibleItemCount(int). Every one of the widget’s methods that follow JavaBean-style conventions for setting a property can be used this way.