🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Handling events issue

#7748
From: John McGrath TeamB
Date: Tue, 22 May 2001 06:19
25 lines
1622 bytes
On Tue, 22 May 2001 10:05:27 +0800, KK wrote:

> Do you have any example showing how to implement it?

Nabin Thomas posted an example below.

If you wanted to use the designer to create the components, you could 
use something like this to add the listener to all text components that 
have been added to the current component:

   Component[] components = getComponents();
   for ( int i = 0;  i < components.length;  ++ i ) {
      if ( components[i] instanceof JTextComponent ) {
          components[i].addKeyListener( listener );
      }
   }

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.1573cda321b4e80598a211@forums.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!212.74.64.35!colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3b087273_1@dnews> <MPG.157363e689710ff898a203@forums.borland.com> <3b09c9d4_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,6b38d73c5e82a869
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-05-21 23:39:00 PST
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: Handling events issue
Date: Tue, 22 May 2001 02:19:07 -0400
Message-ID: <MPG.1573cda321b4e80598a211@forums.borland.com>
References: <3b087273_1@dnews> <MPG.157363e689710ff898a203@forums.borland.com> <3b09c9d4_2@dnews>
X-Newsreader: MicroPlanet Gravity v2.30
NNTP-Posting-Host: 209.92.40.60
X-Trace: dnews 990512346 209.92.40.60 (21 May 2001 23:19:06 -0700)
Lines: 25
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!212.74.64.35!colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews