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.