Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

j2me question

  Asked By: Geeske    Date: Jul 04    Category: Java    Views: 885

I have a problem with method : keyRepeated in class:
"class Canvas extends javax.microedition.lcdui.Displayable"

I have override the method , but it does not work, while keyReleased & keyPressed
work well,

I checked "hasRepeatEvents" and it returns true,

would you please help me in this regards?



2 Answers Found

Answer #1    Answered By: Arnelle Schmidt     Answered On: Jul 04

keyRepeated() method   is device dependent , you should avid using it,you can use keyPressed method by keeping track of previously pressed key codes.This gives you the same result as keyRepeated.

Answer #2    Answered By: Cleopatra Massri     Answered On: Jul 04

Better to use keyPressed and keyReleased method  instaed of using keyRepeated. KeyRepeated method often gives peoblems on various handsets.
You can acheive same effect using keyPressed and keyReleased.

Didn't find what you were looking for? Find more on j2me question Or get search suggestion and latest updates.