diff options
-rw-r--r-- | vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java b/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java index 5c35f6c..c0923f6 100644 --- a/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java +++ b/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java @@ -28,6 +28,16 @@ public class HelloWorldApp extends Application { } })); // + Button closeButton = new Button("close the application"); + mainWindow.addComponent(closeButton ); + closeButton.addListener( new Button.ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + getMainWindow().getApplication().close(); + } + }); + // setMainWindow(mainWindow); + setLogoutURL("http://asynk.ch"); } } |