Basic Use

Basic Use


// Layout for handling clicks
VerticalLayout layout = new VerticalLayout();
        
// Add some components
layout.addComponent(new Label("I'm labeled"));
layout.addComponent(new TextField("Field of text"));

// Handle clicks
layout.addListener(new LayoutClickListener() {
    @Override
    public void layoutClick(LayoutClickEvent event) {
        getWindow().showNotification("Click!");
    }
});