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.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

ShortcutListener on Multiple TextFields question

Saša Meden
7 years ago Sep 22, 2015 1:02pm
Anna Koskinen
7 years ago Sep 24, 2015 1:46pm

If you put a breakpoint inside the handleAction method you can see that the Object target is in this case in fact of type TextField, while the Object sender is your UI. So just if (t1.equals(target)) {...} should do the trick.

Saša Meden
7 years ago Sep 25, 2015 8:50am