With this extensions you can make a Vaadin Panel to support scrollTo(Component)
. The scrolling is animated using ease-in-out to make it more human-friendly.
// Create a Panel and use the extension
Panel panel = new Panel();
SmoothScrollExtension scrollExtension = new SmoothScrollExtension(panel);
// Add some components to the Panel ...
Button button = new Button("Button");
Label label = new Label("Label");
VerticalLayout content = new VerticalLayout(button, label);
panel.setContent(content);
// Scroll (smoothly) to the label
scrollExtension.scrollTo(label);
Fast installation: This is JavaScript-only add-on. No GWT widget set compilation needed.