码迷,mamicode.com
首页 > 移动开发 > 详细

e647. 处理鼠标移动事件

时间:2018-09-02 23:48:18      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:ada   related   void   amp   add   listen   poi   cell   position   

    
component.addMouseMotionListener(new MyMouseMotionListener());
    
    public class MyMouseMotionListener extends MouseMotionAdapter {
        public void mouseMoved(MouseEvent evt) {
            // Process current position of cursor while all mouse buttons are up.
            process(evt.getPoint());
        }
        public void mouseDragged(MouseEvent evt) {
            // Process current position of cursor while mouse button is pressed.
            process(evt.getPoint());
        }
    }

 

Related Examples

e647. 处理鼠标移动事件

标签:ada   related   void   amp   add   listen   poi   cell   position   

原文地址:https://www.cnblogs.com/borter/p/9575416.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!