Get ClickHandler for different Buttons

Hello there,

I have 1 button and my code looks like this.

createUser.addClickHandler(onClickHandler);

private ClickHandler onClickHandler = new ClickHandler() {
            public void onClick(ClickEvent event) {
}
};

now I want to add 2 more buttons to this clickhandler. how can I do it

cheers
Zolf
zolfAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
mccarlConnect With a Mentor IT Business Systems Analyst / Software DeveloperCommented:
Just add the same ClickHandler to the other buttons, ie.

otherButton1.addClickHandler(onClickHandler);
otherButton2.addClickHandler(onClickHandler);
0
All Courses

From novice to tech pro — start learning today.