summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/demo/HelloWorld.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/vaadin/demo/HelloWorld.java')
-rw-r--r--src/com/vaadin/demo/HelloWorld.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/com/vaadin/demo/HelloWorld.java b/src/com/vaadin/demo/HelloWorld.java
new file mode 100644
index 0000000000..36862545ea
--- /dev/null
+++ b/src/com/vaadin/demo/HelloWorld.java
@@ -0,0 +1,22 @@
+package com.vaadin.demo;
+
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Window;
+
+public class HelloWorld extends com.vaadin.Application {
+
+ /**
+ * Init is invoked on application load (when a user accesses the application
+ * for the first time).
+ */
+ @Override
+ public void init() {
+
+ // Main window is the primary browser window
+ final Window main = new Window("Hello window");
+ setMainWindow(main);
+
+ // "Hello world" text is added to window as a Label component
+ main.addComponent(new Label("Hello World!"));
+ }
+}