hi, I think jFormattedTextField will be most suitable for you. you can set the maximum characters,minimum characters and even apply masking to your text field (as in your case. you wish the user to enter in specified format XX-XX-XX). the details about it can be found in javadocs. If you still wish to use jTextField, then you will have to do it programatically. After the user enters in some value, check out for your specified format and set the focus again to this textfield if it is not in your format. Mail back for any confusion