Title: User Input Mechanisms
Course: CPS 261: Advanced Java Concepts ~ DL & MM MASTER > Section: Learning Units - Bb

Presentations and Videos

- User Input Mechanisms lecture video (Time: 48:00)
- User Input Mechanisms document

- Basic Mouse Motion is demonstrated using the MouseMotion inteface. Several examples are created: Spots.java, SpotsSave.java.
- To detect Mouse Motion and dragging, we add one more interface called MouseMotionListener to create the example SpotsArt.java
- A program can access key strokes by implementing the KeyListener interface.
- Using inner classes to implement interfaces such as the MouseListener interface.
- Using adapter classes: An inner class extending the MouseAdapter class to accomplish the same result as the previous example.
- Converting the previous example to an anonymous class.