private static Component addCalendarDateControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
CalendarDate calendarDate = (CalendarDate)dictionary.get(key);
CalendarButton calendarButton = new CalendarButton();
calendarButton.setMinimumWidth(75);
calendarButton.setSelectedDate(calendarDate);
section.add(calendarButton);
Form.setLabel(calendarButton, key);
calendarButton.getCalendarButtonSelectionListeners().add
(new CalendarButtonSelectionListener() {
@Override
public void selectedDateChanged(CalendarButton calendarButtonArgument,
CalendarDate previousSelectedDate) {
try {