Configuring JFormattedTextField

first question: how do you delete posts?second, how do i put a plaindocument on a jformattedtextfield?thanks in advance
[140 byte] By [javabingea] at [2007-10-3 2:56:43]
# 1

> first question: how do you delete posts?

You don't. You update the old posting with a link to the new discussion.

> second, how do i put a plaindocument on a jformattedtextfield?

Well, I would think it already uses a PlainDocument. A PlainDocument simply means you can't use different fonts and colors in the Document since it ignores attributes.

Assuming it doesn't then, the obvious would be:

setDocument(...);

If that doesn't work then JFormattedTextField probably prevents this for some reason.

Maybe if you explained what you are attempting to do another suggestion can be made.

camickra at 2007-7-14 20:46:00 > top of Java-index,Desktop,Core GUI APIs...
# 2
i'm trying to format the field to display the date in MMDDYY... but i want the field to limit the characters typed
javabingea at 2007-7-14 20:46:00 > top of Java-index,Desktop,Core GUI APIs...
# 3
You could try using a [url http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html#filter]Document Filter[/url].
camickra at 2007-7-14 20:46:00 > top of Java-index,Desktop,Core GUI APIs...
# 4
i won't let me override the document
javabingea at 2007-7-14 20:46:00 > top of Java-index,Desktop,Core GUI APIs...
# 5
I am using a JFormattedTextField, with the formatter set to a DateFormatter with the format "MMddyy"... what i'm trying to do is to limit the user's inputs to 6 characters. I've tried adding a document to it already, is there another way of doing this?
javabingea at 2007-7-14 20:46:00 > top of Java-index,Desktop,Core GUI APIs...