title: Displaying a JComponent inside a JPanel on a JFrame
body: <p>I am failing to display a JComponent inside a JPanel on a JFrame. </p>
  
  <p>The following does not work.</p>
  
  <pre><code>JComponent component = ...
  panel.add(component, BorderLayout.CENTER);
  frame.add(panel, BorderLayout.CENTER);
  </code></pre>
  
  <p>But if I add the JComponent to the JFrame[like <code>frame.add(component, BorderLayout.CENTER);</code>], it displays the contents.</p>
  
  <p>Any ideas</p>