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? } And in my form, I am using custom dialog like below: - You are not using your dialogue. 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.
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); }
MyDialog dialog = New MyDialog (); Dialog.show ("INFO", "test content", "OK", "cancel");
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.
No comments:
Post a Comment