title: How to iterate thru all the buttons within a swing interface?
body: <p>I've created a frame with a 3x3 grid of buttons using this code...</p>
  
  <pre><code>    JFrame frame = new JFrame("my 3x3");
      JPanel panel = new JPanel();
      Container pane = frame.getContentPane();
      panel.setLayout(new GridLayout(3,3));
      panel.add(upperLeft);
      panel.add(upperCenter);
      panel.add(upperRight);
      panel.add(midLeft);
      panel.add(midCenter);
      panel.add(midRight);
      panel.add(bottomLeft);
      panel.add(bottomCenter);
      panel.add(bottomRight);
      pane.add(panel);
  </code></pre>
  
  <p>... with each of the upper to lower, left to right elements being JButton objects.</p>
  
  <p>Later in the execution, I need a list of these buttons to iterate through to reset them, but all I have at that point is the frame.  I know buried somewhere in the frame object is a list of components, perhaps layers deep, but where?  Is there a straight forward way to retrieve a frame's buttons?</p>