posted 18 years ago
Hi.
This isn't a mask, but for dates you could use:
DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
JFormattedTextField txtDate = new JFormattedTextField(df);
txtDate.setColumns(10);
the default behavior with this is that if you give months greater than 12, it adds that many months to the date:
so typing 13/22/2003 gets changed to 1/22/2004
to stop this, use
df.setLenient(false)