@Override
	public void setWidget( Widget w )
	{
		// Validate
		if( w == widget )
			return;

		// Detach new child.
		if( w != null )
			w.removeFromParent();

		// Remove old child.
		if( widget != null )
			remove( widget );

		// Logical attach.
		widget = w;

		if( w != null )
		{
			// Physical attach.
			DOM.appendChild( containerElement, widget.getElement() );

			adopt( w );
		}
	}
@ Override public void setWidget ( Widget w ) { if ( w == widget ) return ; if ( w != null ) w . removeFromParent ( ) ; if ( widget != null ) remove ( widget ) ; widget = w ; if ( w != null ) { DOM . appendChild ( containerElement , widget . getElement ( ) ) ; adopt ( w ) ; } }
Sets this panel's widget. Any existing child widget will be removed.

@param w
the panel's new widget, or <code>null</code> to clear the
panel