Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enumerating subcomponents on a JPanel

Status
Not open for further replies.

idarke

Programmer
Jul 23, 2001
420
US
Can anyone give me a quick and dirty way to enumerate through all the components on a JPanel?

I need to add up the heights of all the components the JPanel contains. There doesn't seem to be a getComponents() or getContained() or similar method in JComponent that gives me access to what it contains. But I know there's gotta be one somewhere...

Thanks!
 
Hi idarke,
The methods you are looking for are there, they are in the
Code:
Container
class, which JComponent extends.
MarsChelios
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top