简体   繁体   中英

mouse event while mouse click is held down but not moving , Java awt

I want to get mouse event while mouse click is held down but is not moving. mouseDragged only works while the mouse is moving, but how can I get the event while mouse is not moving.

I'm using java.awt.event.MouseListener Thank you.

There is a full javadoc for AWT (also for a lot of other api): https://docs.oracle.com/javase/7/docs/api/java/awt/event/MouseListener.html

void mousePressed(MouseEvent e) Invoked when a mouse button has been pressed on a component.

void mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.

按住鼠标单击并且鼠标在适当位置时,鼠标未检测到任何事件

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM