|
|
|
|
|
|
|
|
|
|
|
|
|
|
JAVA APPLET
The MouseListener interface and its corresponding adapter class, MouseAdapter, contain these methods: void mouseClicked(MouseEvent) Called just after the user clicks the listened-to component. void mouseEntered(MouseEvent) Called just after the cursor enters the bounds of the listened-to component. void mouseExited(MouseEvent) Called just after the cursor exits the bounds of the listened-to component. void mousePressed(MouseEvent) Called just after the user presses a mouse button while the cursor is over the listened-to component. void mouseReleased(MouseEvent) Called just after the user releases a mouse button
after a mouse press over the listened-to component. Returns the number of quick, consecutive clicks the
user has made (including this event). For example, returns 2 for a double
click. Point getPoint() Return the (x,y) position at which the event occurred, relative to the component that fired the event. boolean isPopupTrigger() Returns true if the mouse event should cause a popup menu to appear. Because popup triggers are platform dependent, if your program uses popup menus, you should call isPopupTrigger for all mouse-pressed and mouse-released events fired by components over which the popup can appear. An example using mouse events
|
||||||||
|
|