Sunday 15 June 2014

java me - Get KeyCode from Dialog in lwuit -


I want to call the key listener and get key code . I have tried to expand the dialog and override the key. Below is my code, what went wrong?

  public class expands MyDialog dialog {Public Zero Keys Reloaded (int keycode) {super.keyReleased (keyCode); // To change the body of the generated methods, tool | Templates. System.out.println ("keycode in dialog:" + keycode); }   

}

And in my form, I am using custom dialog like below: -

  MyDialog dialog = New MyDialog (); Dialog.show ("INFO", "test content", "OK", "cancel");    

You are not using your dialogue.

Show (string, string, string, string) is a static method, this is not an instance method, so a new dialog instance has been created and displayed.

You show () example method (or some other example method such as showDialog), but then you actually have to add components and your "creation" will be a dialog.

No comments:

Post a Comment