// can manipulate the image object within the ClickHandlers for the buttons.
final Image image = new Image();
// Hook up an error handler, so that we can be informed if the image fails
// to load.
image.addErrorHandler(new ErrorHandler() {
public void onError(ErrorEvent event) {
lbl.setText("An error occurred while loading.");
}
});