Please provide specs of your system. It might help, or provide a better lead.
Not an expert on this, but maybe the next links could be relevant.
6 Working with Touch Events (Release 8)
TouchEvent (JavaFX 8)
java - Separate touch from mouse event - Stack Overflow
There could be a bit of an issue with mouse events, and connecting to touch events, as Processing seems to define its own MouseEvent class. Not sure if this is a problem at the end but it is good to keep it in mid during the debugging process. For this, check Library Basics.
Kf