🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7191

Re: Defeating a Listener

#7191
From: Greg Hamer
Date: Tue, 10 Jul 2001 17:32
40 lines
1885 bytes
I suppose that this is just a dis-agreement on the meanings of the words
reference and anonymous, but

class junk{
ActionListener listener;
JButton jbutton1;
...
private void jbInit() {
// get reference to instance of anonymous class
listener = new ActionListener(
  public void actionPerformed(ActionEvent e) {
    jbutton1.removeActionListener(listener);
 });
)
jbutton1.addActionListener(listener);
}
}



"dnoyeB" <lamont_gilbert @ rigidsoftware.com> wrote in message
news:3b4620e9_1@dnews...
> How? If you can remove it, I contend that its not anonymous.  Id like to
see
> your method because I could certainly use it.
>
> without counting a
> x.removeAll();
> of course.
>
>
> "Robert A. Vasseur" <vasseura@mscomm.com> wrote in message
> news:3b44d33f_2@dnews...
> > Anonymity does not necessarily defeat removal. I routinely assign
> anonymous
> > components to non-anonymous components and can remove them at will.
> >
> >
>
>
Technical Details
Message-ID: <3b4b3c5e_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3b44588a_2@dnews> <3b44b7aa_1@dnews> <3b44d33f_2@dnews> <3b4620e9_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,16675a80eb709489
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-07-10 10:35:17 PST
From: "Greg Hamer" <ghamer@troikanetworks.com>
Newsgroups: borland.public.jbuilder.java.language
References: <3b44588a_2@dnews> <3b44b7aa_1@dnews> <3b44d33f_2@dnews> <3b4620e9_1@dnews>
Subject: Re: Defeating a Listener
Date: Tue, 10 Jul 2001 10:32:52 -0700
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 12.31.172.193
Message-ID: <3b4b3c5e_1@dnews>
X-Trace: dnews 994786398 12.31.172.193 (10 Jul 2001 10:33:18 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews