      /**
       * The constants used in this Content Widget.
       */
      public static interface CwConstants extends Constants {
        String cwDatePickerBoxLabel();

        String cwDatePickerDescription();

        String cwDatePickerLabel();

        String cwDatePickerName();
      }

      /**
       * An instance of the constants.
       */
      private final CwConstants constants;

      /**
       * Initialize this example.
       */
      @SuppressWarnings("deprecation")
      @Override
      public Widget onInitialize() {
        // Create a basic date picker
        DatePicker datePicker = new DatePicker();
        final Label text = new Label();

        // Set the value in the text box when the user selects a date
        datePicker.addValueChangeHandler(new ValueChangeHandler<Date>() {
          public void onValueChange(ValueChangeEvent<Date> event) {
            Date date = event.getValue();
            String dateString = DateTimeFormat.getMediumDateFormat().format(date);
            text.setText(dateString);
          }
        });

        // Set the default value
        datePicker.setValue(new Date(), true);

        // Create a DateBox
        DateTimeFormat dateFormat = DateTimeFormat.getLongDateFormat();
        DateBox dateBox = new DateBox();
        dateBox.setFormat(new DateBox.DefaultFormat(dateFormat));

        // Combine the widgets into a panel and return them
        VerticalPanel vPanel = new VerticalPanel();
        vPanel.add(new HTML(constants.cwDatePickerLabel()));
        vPanel.add(text);
        vPanel.add(datePicker);
        vPanel.add(new HTML(constants.cwDatePickerBoxLabel()));
        vPanel.add(dateBox);
        return vPanel;
      }