From ceb7dbb7837778212330906d905d7350e7ea1a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 25 Sep 2011 12:59:29 +0200 Subject: use UserError --- vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java b/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java index 455cbfb..5c35f6c 100644 --- a/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java +++ b/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java @@ -3,6 +3,7 @@ package ch.asynk.helloworld; import java.util.Date; import com.vaadin.Application; +import com.vaadin.terminal.UserError; import com.vaadin.ui.Window; import com.vaadin.ui.Label; import com.vaadin.ui.Button; @@ -23,6 +24,7 @@ public class HelloWorldApp extends Application { @Override public void buttonClick(ClickEvent event) { mainWindow.showNotification("The time is " + new Date()); + event.getButton().setComponentError( new UserError("Stop pressing this button !!") ); } })); // -- cgit v1.1-2-g2b99