Skip to main content

IBM  
Shop Support Downloads
IBM Home Products Consulting Industries News About IBM
IBM : developerWorks : Java Technology : Education - online courses
J2ME: Step by step
Download tutorial zip fileView letter-sized PDF fileView A4-sized PDF fileE-mail this tutorial to a friend
Main menu Section menu Give feedback on this tutorial Previous Next
9. Development using KJava event handling

Handling pen movements page 2 of 6



The event handlers that handle the movement of the stylus on the PDA display are penDown, penMove, and penUp.

The penDown() method is invoked if the user places the pen on the display. It passes the X and Y coordinates of the point at which the stylus was placed on the display.

public void penDown( int x, int y )

The penMove() method is invoked if the user moves the pen over the display. The X and Y coordinates define the current position of the pen.

public void penMove( int x, int y )

The penUp() method is invoked if the user removes the pen from the display. It passes two parameters, the X and Y coordinates of the point from which the pen was removed.

public void penUp( int x, int y )


Main menu Section menu Give feedback on this tutorial Previous Next
Privacy Legal Contact