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 width in a Panel
I am trying to set the width of a AbsoluteLayout inside a Panel. I want the AbsoluteLayout to be as wide as the Panel is. For Panel I am setting:
panel.setWidth("100%"); //$NON-NLS-1$
panel.setHeight("90%"); //$NON-NLS-1$
and for the absoluteLayout:
setWidth(600);
setHeight(200);
The absolutelayout is not taking panel's width.
I have tried:
setWidth(null); -> in AbsoluteLayout
setFullSize() -> in Panel.
Tried increasing 600 to 1000. But nothing works. What is it that I am missing?
Well, just a hint: Mixing absolute pixel- and relative sizes cannot work per definition. If your browser-window is wider than 600px, your AbsoluteLayout will always be smaller than the Panel. Don't know about AbsoluteLayout as I never used it - but you should set the width of the layout in relative matters too. If that doesn't help, try to set the expand-ratio to 1 and / or add the AbsoluteLayout as Content (setContent) instead as (sub-)component (addComponent).
Then you could finally use firebug and try to inspect the generated HTML, maybe you find something interesting there.