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.
animation soft
I want to use the animation proxy to hide from the right and show from the left a datagrid with a width set to 100% in the mainwindow
1) When i push button A, the datagrid hide from the right to the left correctly in a smooth movement. To maintain the hide width i set it to zero after triggered the animation.
2) When pufh button B, the datagrid show from the left to the rifght but not in a smooth movement. To maintain the width i set the it to 100% after the triggered the animation.
This is my code:
proxy.animate(dataGridView, AnimType.ROLL_LEFT_CLOSE).setDuration(500).setDelay(100);
....
proxy.animate(dataGridView, AnimType.ROLL_RIGHT_OPEN).setDuration(500).setDelay(100);
...
// add proxy animator for datagridview
proxy.addListener(new AnimationListener() {
@Override
public void onAnimation(AnimationEvent event) {
if (event.getAnimation().getType() == AnimType.ROLL_LEFT_CLOSE) {
event.getAnimation().getTarget().setWidth("0px");
}
else if (event.getAnimation().getType() == AnimType.ROLL_RIGHT_OPEN) {
event.getAnimation().getTarget().setWidth("100%");
}
}
});
How can obtain a smooth movement when the datagrid is showed like when is hide??.
Best regards.