DatePickerFormatter extends
        JFormattedTextField.AbstractFormatter { @Override public String valueToString(Object value) throws ParseException { if ((value != null) && (_formats.length > 0)){ return _formats[0].format(value); } return null; } DatePickerFormatter();  DatePickerFormatter(DateFormat formats[]);  DatePickerFormatter(Locale locale);  DatePickerFormatter(DateFormat formats[], Locale locale); DateFormat[] getFormats(); @Override Object stringToValue(String text); @Override String valueToString(Object value);  }
@Test public void testPickerFormatterEmptyValueToString() { DatePickerFormatter picker = new DatePickerFormatter( new DateFormat[0]); try { picker.valueToString(new Date()); } catch (ParseException e) { } }