F
Francois
Hi
I need a DateFormatter which gives a zero length String in a JTextField
when receiving a null object and which gives null when the field is
emptied.
I tried:
JFormattedTextField.AbstractFormatterFactory fact = new
DefaultFormatterFactory(
(new DateFormatter(new SimpleDateFormat("dd-MM-yyyy"))),
(new DateFormatter(new SimpleDateFormat("dd-MM-yyyy"))),
(new DateFormatter(new SimpleDateFormat("yyyy-MM-dd"))),
(new DateFormatter(new SimpleDateFormat("yyyy-MM-dd")))
);
and
JFormattedTextField.AbstractFormatterFactory fact = new
DefaultFormatterFactory(
(new DateFormatter(new SimpleDateFormat("dd-MM-yyyy"))),
(new DateFormatter(new SimpleDateFormat("dd-MM-yyyy"))),
(new DateFormatter(new SimpleDateFormat("yyyy-MM-dd"))),
null
);
without success. How have I to do this ?
Thanks in advance !
Francois
I need a DateFormatter which gives a zero length String in a JTextField
when receiving a null object and which gives null when the field is
emptied.
I tried:
JFormattedTextField.AbstractFormatterFactory fact = new
DefaultFormatterFactory(
(new DateFormatter(new SimpleDateFormat("dd-MM-yyyy"))),
(new DateFormatter(new SimpleDateFormat("dd-MM-yyyy"))),
(new DateFormatter(new SimpleDateFormat("yyyy-MM-dd"))),
(new DateFormatter(new SimpleDateFormat("yyyy-MM-dd")))
);
and
JFormattedTextField.AbstractFormatterFactory fact = new
DefaultFormatterFactory(
(new DateFormatter(new SimpleDateFormat("dd-MM-yyyy"))),
(new DateFormatter(new SimpleDateFormat("dd-MM-yyyy"))),
(new DateFormatter(new SimpleDateFormat("yyyy-MM-dd"))),
null
);
without success. How have I to do this ?
Thanks in advance !
Francois