File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Containment Hierarchy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Containment Hierarchy" Watch "Containment Hierarchy" New topic

Containment Hierarchy

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1599
With reference to sun's tutorial

Sun's Tutorial

To appear onscreen, every GUI component must be part of a containment hierarchy. A containment hierarchy is a tree of components that has a top-level container as its root. We'll show you one in a bit.

What does containment hierarchy here mean? Does it mean the class-hierarchy or hierarchy of the components being laid out logically? If it is the latter one, where may i find its details?
[ October 12, 2006: Message edited by: Akhilesh Trivedi ]

Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24195

As it says in your quoted text above, "A containment hierarchy is a tree of components that has a top-level container as its root. " It's your second option. Now, perhaps you misused the word "latter" -- it seems like the second one shouldn't need any more information. In general, a containment hierarchy has a JFrame or JDialog (or Frame or Dialog or plain Window) at the top, with some JPanels or Panels or Canvases inside, with some JButtons or JLabels or Choices or any other components inside those -- but you knew that already.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: Containment Hierarchy
It's not a secret anymore!