Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1887

loop through all controls

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Adam Sandler" <adam.sandler@THRWHITE.remove-dii-this>
Subject loop through all controls
Message-ID <1182663216.188722.72430@i38g2000prf.googlegroups.com> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 23
Date Wed, 27 Apr 2011 15:35:55 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303918555 96.60.20.240 (Wed, 27 Apr 2011 10:35:55 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:35:55 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:1887

Show key headers only | View raw


  To: comp.lang.java.gui
Hello,

In other environments (Delphi and .NET have things like ComponentCount
and FindControl) I've used prior to Java, I could automatically find
all the controls (or only the controls of a certain type, like
checkboxes for example) on a form by passing that form off to some
built in methods which know how to iterate through all the controls
contained within that form.

I haven't been able to find an equivalent feature in Java.  In my Java
app, if I have 5 checkboxes on a panel, I would prefer to pass just
the panel to my method for processing (and have checkbox state
determined there) rather than myMethod (cb1, cb2, cb3, cb4, cb5).

How is this done in Java?

Thanks!

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextNext in thread | Find similar | Unroll thread


Thread

loop through all controls "Adam Sandler" <adam.sandler@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
  Re: loop through all cont "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
    Re: loop through all cont "Adam Sandler" <adam.sandler@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
      Re: loop through all cont "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
      Re: loop through all cont "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
        Re: loop through all cont "Adam Sandler" <adam.sandler@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000

csiph-web