🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Iterating through Components

#8260
From: John McGrath TeamB
Date: Mon, 09 Oct 2000 00:00
21 lines
1227 bytes
On Sun, 8 Oct 2000 14:30:36 -0700, Bob Vasseur wrote:

> Anyone know a simple way to iterate through all the components
> in a frame, or know of a representative sample routine that I
> can look at?  I wrote a routine to do it, because I needed
> something to set fonts on particular component types, but it
> seems overly complex (recursion) to me.

Recursion is an appropriate way to traverse a tree.  You could write an 
Iterator class that would do this if you wanted.  It would be more 
complicated than writing the recursive traversal method, but it would be 
reusable.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.144b3ed98708a893989bf3@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39e0e467_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,db68b40af791dfaa
X-Google-Attributes: gid111d45,public
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Subject: Re: Iterating through Components
Date: 2000/10/09
Message-ID: <MPG.144b3ed98708a893989bf3@forums.borland.com>
X-Deja-AN: 679217331
References: <39e0e467_2@dnews>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing