
- SWING Tutorial
- SWING - Home
- SWING - Overview
- SWING - Environment
- SWING - Controls
- SWING - Event Handling
- SWING - Event Classes
- SWING - Event Listeners
- SWING - Event Adapters
- SWING - Layouts
- SWING - Menu
- SWING - Containers
- SWING Useful Resources
- SWING - Quick Guide
- SWING - Useful Resources
- SWING - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
SWING - MouseMotionEvent Class
Introduction
The interface MouseMotionEvent indicates a mouse action occurred in a component. This low-level event is generated by a component object when a mouse is dragged or moved.
Class Declaration
Following is the declaration for java.awt.event.MouseMotionEvent Class −
public class MouseMotionEvent extends InputEvent
Interface Methods
Sr.No. | Method & Description |
---|---|
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. |
Methods Inherited
This interface inherits methods from the following classes −
- java.awt.event.InputEvent
- java.awt.event.ComponentEvent
- java.awt.AWTEvent
- java.util.EventObject
- java.lang.Object
swing_event_classes.htm
Advertisements