- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
/*
<applet code="MouseWheelEvents" width=300 height=200>
</applet>
*/
public class MouseWheelEvents extends Applet implements MouseWheelListener
{
public void init() {
addMouseWheelListener(this);
}
public void start() {
}
public void stop() {
}
public void destroy() {
}
double getPWR;
int getSA, getST, getUTS, getWR;
public void mouseWheelMoved(MouseWheelEvent e) {
getPWR = e.getPreciseWheelRotation();
getSA = e.getScrollAmount();
getST = e.getScrollType();
getUTS = e.getUnitsToScroll();
getWR = e.getWheelRotation();
repaint();
}
public void paint(Graphics g) {
g.drawString(getPWR+" "+getSA+" "+getST+" "+getUTS+" "+getWR, 10, 20);
}
}
Комментарии (0) RSS
Добавить комментарий