Image Button in BlackBerry

前端 未结 4 489
一整个雨季
一整个雨季 2020-11-28 12:30

How do I implement an image button in BlackBerry?

4条回答
  •  离开以前
    2020-11-28 13:04

    easiest way to do that:

    step 1:draw a image with specific coordinates(imageX,imageY). step 2:add a method in your Code:

     void pointerControl(int x, int y) {
            if (x>imageX && ximageY && y < imageY+imageName.getHeight) {
                //to do code here
            } 
    
        }
    
        where imageName:name of image
              imageX=x coordinate of image(Top-Left)
              imageY=y coordinate of image(Top-Left)
    

提交回复
热议问题