I'm really new to GWT so please point me in the right direction. I'm trying to create a Panel with widgets in it, in this case I created a FocusPanel and would like for the FocusPanel to listen to keyboard input. Just any buttonclick would be fine. But I can't seem to get it to get any events. See the code below for what I tried. What is wrong?
public class VMyComponent extends FocusPanel { public VMyComponent() { addKeyPressHandler(new KeyPressHandler() { setElement(Document.get().createDivElement()); @Override public void onKeyPress(KeyPressEvent event) { Window.alert("OMG GWT PLZ ACTUALLY WURKZ FOR ONCE!"); } }); } }
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.