private final Button button;
private final ClickHandler clickHandler;

public MyClass(){


              //Code 1
               button.addClickHandler(new
com.google.gwt.event.dom.client.ClickHandler() {
                        public void 
onClick(com.google.gwt.event.dom.client.ClickEvent
event) {
                                Window.alert("msg");
                        }
                });

                //Code 2
                clickHandler=new com.google.gwt.event.dom.client.ClickHandler() 
{

                        public void 
onClick(com.google.gwt.event.dom.client.ClickEvent
event) {
                                Window.alert("msg");
                        }
                };
                button.addClickHandler(clickHandler);
}

Which code is better for performance ?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to