j2me如何判断没有按下手机按钮 5

 我来答
wish521
2010-07-21 · TA获得超过131个赞
知道小有建树答主
回答量:336
采纳率:50%
帮助的人:138万
展开全部
keyPressed
protected void keyPressed(int keyCode)Called when a key is pressed.
The getGameAction() method can be called to determine what game action, if any, is mapped to the key. Class Canvas has an empty implementation of this method, and the subclass has to redefine it if it wants to listen this method.

Parameters:
keyCode - the key code of the key that was pressed

--------------------------------------------------------------------------------

keyRepeated
protected void keyRepeated(int keyCode)Called when a key is repeated (held down).
The getGameAction() method can be called to determine what game action, if any, is mapped to the key. Class Canvas has an empty implementation of this method, and the subclass has to redefine it if it wants to listen this method.

Parameters:
keyCode - the key code of the key that was repeated
See Also:
hasRepeatEvents()

--------------------------------------------------------------------------------

keyReleased
protected void keyReleased(int keyCode)Called when a key is released.
The getGameAction() method can be called to determine what game action, if any, is mapped to the key. Class Canvas has an empty implementation of this method, and the subclass has to redefine it if it wants to listen this method.

Parameters:
keyCode - the key code of the key that was released

--------------------------------------------------------------------------------

pointerPressed
protected void pointerPressed(int x,
int y)Called when the pointer is pressed.
The hasPointerEvents() method may be called to determine if the device supports pointer events. Class Canvas has an empty implementation of this method, and the subclass has to redefine it if it wants to listen this method.

Parameters:
x - the horizontal location where the pointer was pressed (relative to the Canvas)
y - the vertical location where the pointer was pressed (relative to the Canvas)

--------------------------------------------------------------------------------

pointerReleased
protected void pointerReleased(int x,
int y)Called when the pointer is released.
The hasPointerEvents() method may be called to determine if the device supports pointer events. Class Canvas has an empty implementation of this method, and the subclass has to redefine it if it wants to listen this method.

Parameters:
x - the horizontal location where the pointer was released (relative to the Canvas)
y - the vertical location where the pointer was released (relative to the Canvas)

--------------------------------------------------------------------------------

pointerDragged
protected void pointerDragged(int x,
int y)Called when the pointer is dragged.
The hasPointerMotionEvents() method may be called to determine if the device supports pointer events. Class Canvas has an empty implementation of this method, and the subclass has to redefine it if it wants to listen this method.

Parameters:
x - the horizontal location where the pointer was dragged (relative to the Canvas)
y - the vertical location where the pointer was dragged (relative to the Canvas)
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式