am trying to run some code from the Showcase.
For the section of code given below---
IButton reset = new IButton("<b>Reset</b>");
reset.setLeft(260);
reset.setTop(150);
reset.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
anim.setRect(100, 250, 100, 100);
anim.setOpacity(100);
anim.scrollTo(0, 0);
anim.show();
dest.setRect(400, 200, 200, 200);
scroller.setRect(640, 10, 100, 160);
scroller.scrollTo(0, 0);
}
});
I am getting an error for "reset.addClickHandler(new ClickHandler() { ........."
The method addClickHandler(ClickHandler) in the type Canvas is not applicable for the arguments (new ClickHandler(){})
How do I rectify this error? I am using directly the code provided in the showcase. I am using SmartGWT ver 3 in my java web app.
For the section of code given below---
IButton reset = new IButton("<b>Reset</b>");
reset.setLeft(260);
reset.setTop(150);
reset.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
anim.setRect(100, 250, 100, 100);
anim.setOpacity(100);
anim.scrollTo(0, 0);
anim.show();
dest.setRect(400, 200, 200, 200);
scroller.setRect(640, 10, 100, 160);
scroller.scrollTo(0, 0);
}
});
I am getting an error for "reset.addClickHandler(new ClickHandler() { ........."
The method addClickHandler(ClickHandler) in the type Canvas is not applicable for the arguments (new ClickHandler(){})
How do I rectify this error? I am using directly the code provided in the showcase. I am using SmartGWT ver 3 in my java web app.
Comment