Giuseppa
the problem is how to capture the wrong or malformatted date in order to issue the dialog.
You would capture the data by getting the text from the JTextField or DateField.
By the way, it's odd to create a class extending a minor component like a JTextField. Why not just create the component within your class,
?