🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9421

Re: Help creating a JTextField that implements DocumentListener

#9421
From: John P. McGrath
Date: Wed, 15 Mar 2000 00:00
20 lines
1184 bytes
On Tue, 14 Mar 2000 11:44:06 -0500, Jeff Marendo wrote:

> So far, I've made a class that extends JTextField and
> implements DocumentListener.  I have print out statements
> within the changedUpdate, insertUpdate and removeUpdate
> methods.  My constructors are: super( ), and super(text).
> I can use this class as is, but of course nothing happens,
> so I know I'm missing something but I don't know what it
> is.  Any guesses at what I might be missing will be 
> appreciated.  

Did you register your listener with the JTextField's Document?
For example:

    getDocument().addDocumentListener( listener );

-- 
John P. McGrath
<JPMcGrath@fast.net>
<jpm@nscs.fast.net>
Technical Details
Message-ID: <MPG.13391883717afcd59897f3@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8alphp$qv54@bornews.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,c63a1a3a015cc9ed
X-Google-Attributes: gid111d45,public
From: John P. McGrath <JPMcGrath@fast.net>
Subject: Re: Help creating a JTextField that implements DocumentListener
Date: 2000/03/15
Message-ID: <MPG.13391883717afcd59897f3@forums.borland.com>
X-Deja-AN: 597740540
References: <8alphp$qv54@bornews.borland.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing