title: A Fast Way to Determine Whether A Componet is Found In JPanel
body: <p>May I know how can I determine whether a component is found in JPanel?</p>
  
  <pre><code>boolean isThisComponentFoundInJPanel(Component c)
  {
      Component[] components = jPanel.getComponents();
      for (Component component : components) {
          if (c== component) {
                  return true;
          }
      }
      return false;
  }
  </code></pre>
  
  <p>Using loop is not efficient. Is there any better way?</p>