Thread View: borland.public.jbuilder.java.swing
3 messages
3 total messages
Started by Paul
Sun, 14 Aug 2005 16:36
Adding a document listener to a data bound field.
Author: Paul
Date: Sun, 14 Aug 2005 16:36
Date: Sun, 14 Aug 2005 16:36
13 lines
1121 bytes
1121 bytes
Sorry about the blank post... I understand how to create a document object and attach it to a tex field and then wire in the listeners for edit events. How do I do the same thing for a dbText field? When I hook it up the same way, none of the Update events get called. Basically I want to update another field based on the data being entered. Thanks
Re: Adding a document listener to a data bound field.
Author: Paul Furbacher [TeamB]
Date: Mon, 15 Aug 2005 04:18
Date: Mon, 15 Aug 2005 04:18
36 lines
2131 bytes
2131 bytes
Paul wrote:
> I understand how to create a document object and attach it to a
> text field and then wire in the listeners for edit events.
>
> How do I do the same thing for a dbText field? When I hook it
> up the same way, none of the Update events get called.
>
> Basically I want to update another field based on the data being
> entered.
Since the dbTextField has a default document,
just get it (it's a method on JTextField, if
I'm not mistaken) and register your event handler.
(You shouldn't need to create and "attach"
a document in either case you describe above.
You would only need to do so if you were
setting a custom document object into the
text field.)
--
Paul Furbacher (TeamB)
Save time, search the archives:
http://info.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Re: Adding a document listener to a data bound field.
Author: paul
Date: Mon, 15 Aug 2005 23:23
Date: Mon, 15 Aug 2005 23:23
29 lines
1762 bytes
1762 bytes
"Paul Furbacher [TeamB]" <pfurbacher@mac.com> wrote: >Paul wrote: > >> I understand how to create a document object and attach it to a >> text field and then wire in the listeners for edit events. >> >> How do I do the same thing for a dbText field? When I hook it >> up the same way, none of the Update events get called. >> >> Basically I want to update another field based on the data being >> entered. > >Since the dbTextField has a default document, >just get it (it's a method on JTextField, if >I'm not mistaken) and register your event handler. > >(You shouldn't need to create and "attach" >a document in either case you describe above. >You would only need to do so if you were >setting a custom document object into the >text field.) > > Thanks. I'll give it a shot. I orginally went with the LostFocus event, but I'd rather do something keystroke by keystroke. Paul
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads