code: @Override
  	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
  		WPanel panel = (WPanel) component;
  		XmlStringBuilder xml = renderContext.getWriter();
  		BorderLayout layout = (BorderLayout) panel.getLayout();
  		Size hgap = layout.getHorizontalGap();
  		String hgapString = hgap == null ? null : hgap.toString();
  		Size vgap = layout.getVerticalGap();
  		String vgapString = vgap == null ? null : vgap.toString();
  
  		xml.appendTagOpen("ui:borderlayout");
  
  		xml.appendOptionalAttribute("hgap", hgapString);
  		xml.appendOptionalAttribute("vgap", vgapString);
  
  		xml.appendClose();
  
  		// Fetch the children and their constraints.
  		final int childCount = panel.getChildCount();
  		List<Duplet<WComponent, BorderLayoutConstraint>> children = new ArrayList<>(childCount);
  
  		for (int i = 0; i < childCount; i++) {
  			WComponent child = panel.getChildAt(i);
  			children.add(new Duplet<>(child, getConstraints(panel, child)));
  		}
  
  		// Now paint them
  		paintChildrenWithConstraint(children, renderContext, BorderLayout.NORTH);
  		paintChildrenWithConstraint(children, renderContext, BorderLayout.EAST);
  		paintChildrenWithConstraint(children, renderContext, BorderLayout.SOUTH);
  		paintChildrenWithConstraint(children, renderContext, BorderLayout.WEST);
  		paintChildrenWithConstraint(children, renderContext, BorderLayout.CENTER);
  
  		xml.appendEndTag("ui:borderlayout");
  	}
docs: Paints the given WPanel's children.
  
  @param component the container to paint.
  @param renderContext the RenderContext to paint to.