posted 20 years ago
If you are writing a simple application, here are a few suggestions.
1) If you have a single text field to enter the date (assuming the format is mm/dd/yyyy), you can read the year first. You can check the condition if the is entered as desired; minimum value <= year <= maximum value.
If this condition is satisfied, you can check if the month and day entered is valid. java.util.Calendar provides with methods like getActualMinimum and getActualMaximum which you can use to check the validity of entered field.
2) A better solution is to provide a combobox from where the user can make his selection.