How to make a JTextfield that takes exactly x characters

I am designing a GUI using swing where i need a method that can help to make a JTextfield that takes exactly x characters.
[129 byte] By [TapasBa] at [2007-11-27 5:05:08]
# 1
Either JFormattedTextField or you implement a custom Document.
PhHeina at 2007-7-12 10:23:33 > top of Java-index,Desktop,Core GUI APIs...
# 2
Can you send me the exact method
TapasBa at 2007-7-12 10:23:33 > top of Java-index,Desktop,Core GUI APIs...
# 3
Huh?! What method?
PhHeina at 2007-7-12 10:23:33 > top of Java-index,Desktop,Core GUI APIs...
# 4
You where given the answer 5 days ago.Quit wasting everybodies time and start reading your own postings.
camickra at 2007-7-12 10:23:33 > top of Java-index,Desktop,Core GUI APIs...