super.remove(widget);
wrapper = new VCaptionWrapper(paintable, client);
super.add(wrapper, locationToElement.get(loc));
childWidgetToCaptionWrapper.put(widget, wrapper);
}
wrapper.updateCaption();
} else {
if (wrapper != null) {
// Remove the wrapper and add the widget directly to the layout
final String loc = getLocation(widget);
super.remove(wrapper);