code: static void showWarning(final String caption, final String description) {
  
          Notification warning = new Notification(caption, description, Type.WARNING_MESSAGE, true);
          warning.setDelayMsec(-1);
          warning.show(UI.getCurrent().getPage());
  
      }
docs: Displays a localized warning.
  @param caption the caption of the warning.
  @param description the description of the warning.