July 2013
Beginner
246 pages
5h 3m
English
Let's use an absolute layout.
LayoutFrameworkUI class to add the highlighted code:public class LayoutFrameworkUI extends UI {
protected void init(VaadinRequest request) {
...
layout.addMenuOption("Absolut layout",
getAbsolutLayout());
}
...
private Component getAbsolutLayout() {
Button button = new Button(
"I'm whimsically located at 42, 57");
AbsoluteLayout absoluteLayout = new AbsoluteLayout();
absoluteLayout.addComponent(button,
"left: 42px; top: 57px");
return absoluteLayout;
}
}As expected the button is located exactly at the pixel coordinates ...
Read now
Unlock full access