SWING MouseMotionEvent事件處理
接口MouseMotionEvent指示組件中發生鼠標動作。這種低層次的事件所產生的一個組件對象時,拖動鼠標或移動。
類聲明
以下是聲明 java.awt.event.MouseMotionEvent類:
public class MouseMotionEvent extends InputEvent
接口方法
S.N. | 方法 & 描述 |
---|---|
1 |
void mouseDragged(MouseEvent e) Invoked when a mouse button is pressed on a component and then dragged. |
2 |
void mouseMoved(MouseEvent e) Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed. |
方法繼承
這個接口繼承的方法從以下類彆:
-
java.awt.event.InputEvent
-
java.awt.event.ComponentEvent
-
java.awt.AWTEvent
-
java.util.EventObject
-
java.lang.Object