'Getting All Touch Events in JavaFX

I am planning to use a plug and play touch panel on my application. When I connect the panel to windows, my non-touch computer works as if it has a touch screen. My goal is to calculate the coordinate of all touches to the panel.

I'm developing with JavaFX. Some components have methods such as onTouchMove, onTouchPressed, onTouchXXX. But I don't want to catch touch event for a particular component, I want to catch all of them.

Is there a way to intercept so that I can get the coordinates of the touches on the screen with JAVA?

Thank you.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source