PopupView doesn't display caption

Since my
bug report
isn’t getting any attention, perhaps someone here can think of a work-around.

The caption text (AbstractComponent.setCaption()) on a PopupView does not display. An example program is below. I don’t see how to just use a label for the caption, since it wouldn’t line up with the other captions in the FormLayout.

package com.example.vaadintest;

import com.vaadin.Application;
import com.vaadin.ui.*;

public class VaadinTestApplication extends Application
  public void init()
    Window mainWindow = new Window("Vaadin Test Application");

    FormLayout mainLayout = new FormLayout();
    TextField text = new TextField("Text Caption:");

    PopupView popup = new PopupView ("Popup short text", new Label("I'm the popup content!"));
    popup.setCaption("Popup Caption:");


the reason for this and the usable workarounds are exactly the same as for CheckBox within a FormLayout - see
this post
for more information.


Also you can just wrap the PopupView to a CssLayout and set the caption to the layout.

CssLayout layout = new CssLayout();
PopupView popup = new PopupView("Popup short text", new Label("I'm the popup content!"));
layout.setCaption("Popup Caption:");

Thanks Johannes. That looks like the work-around I was looking for.