Forgive me if this question has been asked and answered, as I have been unable to find it if it has.
I can find several examples like
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
... stuff ...
}
});
I'm trying to understand how to implement a button click handler using the following structure.
public class myClass implements EntryPoint {
final Button MyButton = new Button("text");
:
:
void onClickMyButton(???) {
... stuff ...
}
:
:
}
To "me", this structure is more easily read and is just my preference in coding style. But I don't know how to implement it.
I'm using Eclipse and GWT for a Java Web App. Any help would be appreciated.