O'Reilly logo

Vaadin 7 UI Design By Example Beginner's Guide by Alejandro Duarte

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – my first tree

Let's start coding right away! Follow these steps to create your first tree:

  1. Create a new Vaadin project named my-first-tree using your IDE.
  2. Implement your UI class like this one:
    public class MyFirstTreeUI extends UI { protected void init(VaadinRequest request) { final VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); setContent(layout); Tree familyTree = new Tree(); familyTree.addItem("Families"); familyTree.addItem("The Jackson"); familyTree.addItem("The Simpsons"); familyTree.addItem("The Rothschilds"); familyTree.addItem("The Hapsburgs"); familyTree.addItem("The Addams"); familyTree.setParent("The Jackson", "Families"); familyTree.setParent("The Simpsons", "Families"); familyTree.setParent("The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required