Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
AbsoluteLayout not showing anything
Hello!
I'm having a borderline embarrassing issue:
I'm trying to use AbsoluteLayout in order to create a custom box with a label and some buttons inside it, but it doesn't show anything. Here's my code:
Panel panel=new Panel();
AbsoluteLayout casuta=new AbsoluteLayout();
casuta.setSizeFull();
Label datili=new Label("Aici tre sa vie datili");
casuta.addComponent(datili, "top:40px;left:5px");
panel.setContent(casuta);
tot.addComponent(panel);
I'm seeing the outline from the panel, but there's nothing inside it. No label, nothing. Any clues? Thanks!
you need to give the initial absolute height and width to the absolute layout . the following code shows the label and layout:
Panel panel=new Panel();
AbsoluteLayout casuta=new AbsoluteLayout();
casuta.setHeight("300px");
casuta.setWidth("500px");
//casuta.setSizeFull();
Label datili=new Label("Aici tre sa vie datili");
casuta.addComponent(datili, "top:40px;left:5px");
panel.setContent(casuta);
tot.addComponent(panel);