Vaadin Widgets

Vaadin comes with a number of Vaadin-specific widgets in addition to the GWT widgets, some of which you can use in pure client-side applications. The Vaadin widgets have somewhat different feature set from the GWT widgets and are foremost intended for integration with the server-side components, but some may prove useful for client-side applications as well.

Java

  1. public class MyEntryPoint implements EntryPoint {
  2. @Override
  3. public void onModuleLoad() {
  4. // Add a Vaadin button
  5. VButton button = new VButton();
  6. button.setText("Click me!");
  7. button.addClickHandler(new ClickHandler() {
  8. @Override
  9. public void onClick(ClickEvent event) {
  10. mywidget.setText("Clicked!");
  11. }
  12. });
  13. RootPanel.get().add(button);
  14. }
  15. }