I am making a simulator in which I have a button with different behavior depending on the duration of the press.
If the button is pressed less than 3 seconds, prints nothing, between 3 and 10, prints 1 and higher than 10 prints 2.
Should I try with MouseListener
or ActionListener
? Any example code would be great! Thanks.