Solved

Get ClickHandler for different Buttons

Posted on 2013-05-21
1
227 Views
Last Modified: 2013-05-21
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
0
Comment
Question by:zolf
1 Comment
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
ID: 39186448
Just add the same ClickHandler to the other buttons, ie.

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

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
basic hardware to learn oop advanced design patterns 3 74
allStar challenge 1 41
maven java path setting 5 50
Java Loop 4 14
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now