The following link shows a sample: https://www.google.com/logos/2016/halloween16/halloween16.html
In this game the user needs to draw signs quickly with his mouse to defeat the approaching enemies. How I can detect these signs the user drawing with his mouse?
You could use JCanvas. https://projects.calebevans.me/jcanvas/ it works really well. Here is a demo: https://projects.calebevans.me/painter/
just strip the rest of the tools yo don't need.
Good luck.