i want to call click event function for Button in GWT... I tried this code but it is not working..
Button btnAddField = new Button();
btnAddField.setText("Add");
btnAddField.setWidth("225px");
btnAddField.addClickHandler(new btnAddFieldButtonClickListener());
private class btnAddFieldButtonClickListener implements ClickHandler{
public void onClick(ClickEvent event) {
Window.alert("Called Click Event");
}
}
this function wiil call at click the button
but it does not call when call this function btnAddField.click()