mm is minutes. MM is months:
SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd");
See the documentation for more details.
You should set that to be strict (df.setLenient(false), and then you don't need to try to format the result again - just the parse exception should be enough.
Personally I'd use Joda Time for any date/time work in Java though - it's a much nicer API.
As for java.util.Date vs java.sql.Date - the code you've given us would entirely use java.util.Date. If you've already got an import for java.sql.Date which you want to preserve, you'd want something like:
java.util.Date testDate = ...;
Although as you don't need to reformat it, you may not even need a variable at all:
SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd");
df.setLenient(false);
Date testDate = null;
boolean valid = false;
try {
df.parse(jTextField3.getText());
valid = true;
}
catch (ParseException e) { } // valid will still be false
if (!valid) {
JOptionPane.showMessageDialog(rootPane, "invalid date!!");
}
(Or you could show the message dialog in the catch block, but then you can't easily have an else clause for the success case...)