private static void addLocalizedPickerAndLabel ( int rowMarker , String labelText , String languageCode ) { // Create the localized date picker and label. Locale locale = new Locale ( languageCode ) ; DatePickerSettings settings = new DatePickerSettings ( locale ) ; // Set a minimum size for the localized date pickers, to improve the look of the demo. settings . setSizeTextFieldMinimumWidth ( 125 ) ; settings . setSizeTextFieldMinimumWidthDefaultOverride ( true ) ; DatePicker localizedDatePicker = new DatePicker ( settings ) ; localizedDatePicker . setDateToToday ( ) ; panel . panel4 . add ( localizedDatePicker , getConstraints ( 1 , ( rowMarker * rowMultiplier ) , 1 ) ) ; panel . addLabel ( panel . panel4 , 1 , ( rowMarker * rowMultiplier ) , labelText ) ; }
addLocalizedPickerAndLabel This creates a date picker whose locale is set to the specified language . This also sets the picker to today s date creates a label for the date picker and adds the components to the language panel .