title: How can I get all the components of a panel in Java Swing?
body: <p>How  can I get all the components of a panel in Java Swing?</p>
  
  <p>Is there any method like <code>foreach</code> in C# to deal all the child components of a JPanel?</p>