Created
November 8, 2021 14:12
-
-
Save LiamJolly/28706066a79ec8984654f302c9ef85bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.overliambitious.vaadin.frontend; | |
import com.vaadin.flow.component.button.Button; | |
import com.vaadin.flow.component.html.Label; | |
import com.vaadin.flow.component.notification.Notification; | |
import com.vaadin.flow.component.orderedlayout.VerticalLayout; | |
import com.vaadin.flow.router.Route; | |
import javax.annotation.PostConstruct; | |
@Route("") | |
public class MainView extends VerticalLayout { | |
@PostConstruct | |
public void init() { | |
Notification notification = new Notification("Hello!", 3000); | |
Label label = new Label("Hello World!"); | |
Button button = new Button("Click here!", click -> notification.open()); | |
add(notification); | |
add(label); | |
add(button); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment