diff options
author | Artur Signell <artur.signell@itmill.com> | 2009-02-16 18:57:33 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2009-02-16 18:57:33 +0000 |
commit | d1d56efde65005665659847a85f749406826821d (patch) | |
tree | 80d245d44a4a400be6fb609cd294634066e98777 /src/com/itmill/toolkit/demo/HelloWorld.java | |
parent | a88152ef489cf5af6a7d442abc8e5a3e079a91df (diff) | |
download | vaadin-framework-d1d56efde65005665659847a85f749406826821d.tar.gz vaadin-framework-d1d56efde65005665659847a85f749406826821d.zip |
Fix for #2359 - Demo app renewal. Merged all changes from /branches/2359_Renew_demo_apps
svn changeset:6862/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/demo/HelloWorld.java')
-rw-r--r-- | src/com/itmill/toolkit/demo/HelloWorld.java | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/src/com/itmill/toolkit/demo/HelloWorld.java b/src/com/itmill/toolkit/demo/HelloWorld.java index bcbf447d09..d77ce235f2 100644 --- a/src/com/itmill/toolkit/demo/HelloWorld.java +++ b/src/com/itmill/toolkit/demo/HelloWorld.java @@ -1,48 +1,22 @@ -/* -@ITMillApache2LicenseForJavaFiles@ - */ - package com.itmill.toolkit.demo; import com.itmill.toolkit.ui.Label; import com.itmill.toolkit.ui.Window; -/** - * The classic "hello, world!" example for IT Mill Toolkit. The class simply - * implements the abstract {@link com.itmill.toolkit.Application#init() init()} - * method in which it creates a Window and adds a Label to it. - * - * @author IT Mill Ltd. - * @see com.itmill.toolkit.Application - * @see com.itmill.toolkit.ui.Window - * @see com.itmill.toolkit.ui.Label - */ public class HelloWorld extends com.itmill.toolkit.Application { /** - * The initialization method that is the only requirement for inheriting the - * com.itmill.toolkit.service.Application class. It will be automatically - * called by the framework when a user accesses the application. + * Init is invoked on application load (when a user accesses the application + * for the first time). */ @Override public void init() { - /* - * - Create new window for the application - Give the window a visible - * title - Set the window to be the main window of the application - */ + // Main window is the primary browser window final Window main = new Window("Hello window"); setMainWindow(main); - /* - * - Create a label with the classic text - Add the label to the main - * window - */ + // "Hello world" text is added to window as a Label component main.addComponent(new Label("Hello World!")); - - /* - * And that's it! The framework will display the main window and its - * contents when the application is accessed with the terminal. - */ } } |