is there a way in Java to directly check if one of the mouse buttons is pressed without using events, listeners, etc.? I would like to have a thread that checks every 100 milliseconds if the mouse button is clicked and then does something. Therefore, if the user holds the mouse button for a while, he calls several answers.
So, I am looking for a method that gives the state of the mouse without going through the usual event processing system.
thanks
user167771
source
share