1

I have a frame panel

Frame frameExample = new Frame();

I need to hide the frame when I click on it, I know the method setvisible

frameExample.setVisible(false);

But how can add onclick handler on frame in gwt?

Arpit
  • 6,212
  • 8
  • 38
  • 69
user1937709
  • 59
  • 1
  • 6

1 Answers1

0

To add handler for known DOM events on Frame you should use addDomHandler api. Frame extends from Widget and widget has addDomHandler api.

Also from the addDomHandler java doc

 /**
   * Adds a native event handler to the widget and sinks the corresponding
   * native event. If you do not want to sink the native event, use the generic
   * addHandler method instead.
   */

However i am not sure whether Click event is supported by Frame. A quick stackoveflow search for similar javascript problem gives Detect Click into Iframe using JavaScript.

Community
  • 1
  • 1
appbootup
  • 9,537
  • 3
  • 33
  • 65
  • The GWT [Frame](http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/Frame.html) class wraps **` – Boris Brudnoy Jan 04 '13 at 21:26