public StackLayoutPanel() {
super(new BoxLayout(Orientation.VERTICAL));
final LayoutPanel layoutPanel = getLayoutPanel();
layoutPanel.setWidgetSpacing(0);
layoutPanel.setAnimationCallback(new AnimationCallback() {
public void onAnimationComplete() {
for (int i = 0, n = getLayoutPanel().getWidgetCount(); i < n; i++) {
Widget w = getLayoutPanel().getWidget(i);
if (w instanceof Caption)
w.getElement().getStyle().setZIndex(0);