Sounds like it would work. The interface to DocumentEvent,
the argument passed to you in the event message, gives
you access to the Document via getDocument(). That would
give you all the info you need, since you don't care about
which text area the document belongs to.
Give it a try with a small demo.
--
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.
Document documentN = jTextAreaN.getDocument();
and a
documentN.addDocumentListener( new
Frame_1_Document_documentAdapter(this));
for each JTextArea.
Don't know if there are any more shortcuts.
> [...]
> Thanks for the information. My test case worked.
> I did however have to code a
>
> Document documentN = jTextAreaN.getDocument();
>
> and a
>
> documentN.addDocumentListener( new
> Frame_1_Document_documentAdapter(this));
>
> for each JTextArea.
>
> Don't know if there are any more shortcuts.
That sounds right except that you could point
them all at the same listener (maybe you did that).
The Property Inspector in the UI Designer doesn't
give you access so you have to manually code this.
Not a terribly big deal -- on the plus side, it
keeps your hand in the business of writing code
for such things as listeners. (Having the
Designer do everything can make a lot of essential,
underlying knowledge go poof after a while.)