Time for action – a tedious application
Follow these steps to create a tedious to use application:
Create a new Vaadin project. We are using shortcut as project name.
Code your
UI
class:public class ShortcutUI extends UI { protected void init(VaadinRequest request) { final VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); layout.setSpacing(true); setContent(layout); final TextField tf = new TextField("Your data:"); layout.addComponent(tf); Button button = new Button("Send data (ENTER)"); button.addClickListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { layout.addComponent(new Label(tf.getValue())); tf.setValue(""); } }); layout.addComponent(button); } }
Run the application and try to send many data.
What just happened?
If you continue using the application for a long time, one of two things will happen: Your hand will start to feel tired because of the huge amount of...