N
N
newdancer2019-10-16 22:30:09
Java
newdancer, 2019-10-16 22:30:09

How in java swing to handle 3 types of jButton clicks?

How in java swing to handle 3 types of jButton clicks?
That is, you need to know when it is pressed, released and long pressed. How can you find out?
I tried to assign buttons to assign Action and then in ActionListener but only pressing

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
koperagen, 2019-10-16
@koperagen

What you need is not an ActionListener but a MouseListener. https://docs.oracle.com/javase/7/docs/api/java/awt...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question