[英]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.
mouseDragged仅在鼠标移动时有效,但是如何在鼠标不移动时获取事件。
I'm using java.awt.event.MouseListener Thank you. 我正在使用java.awt.event.MouseListener谢谢。
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 有一个完整的AWT Javadoc(也有很多其他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 mousePressed(MouseEvent e)在组件上按下鼠标按钮时调用。
void mouseReleased(MouseEvent e) Invoked when a mouse button has been released on a component.
void mouseReleased(MouseEvent e)在组件上释放鼠标按钮时调用。
按住鼠标单击并且鼠标在适当位置时,鼠标未检测到任何事件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.