I don't know for sure that this specific to Linux Java so my apologies
in advance. I am using this code for date validation:
DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
try {
Date theDate = df.parse(theText);
jtf.setText( df.format( theDate )); //??!!
} catch (ParseException pe) {
System.out.println(pe);
jtf.setText("");
jtf.repaint();
}
This method allows incorrect dates like 13/9/98 without complaining. My
testers are complaining though. :-) Does anybody know of a better/more
accurate date validation class out there? Or a better way to use this
one?
Thanks in advance,
Ryan