title: Java Swing JTabbedPane add JPanel to tab then modify it
body: <p>I want to create a JTabbedPane, add a JPanel to everyone and then add something to the JPanel:</p>
  
  <pre><code>private void initTabbedPane(JTabbedPane tp)
  {
      System.out.println("FestplattenreinigerGraphicalUserInterface::initTabbedPane()");
  
      // Init Tab-Names
      Vector&lt;String&gt; tabNames = new Vector&lt;String&gt;();
      tabNames.addElement("Startseite");
      tabNames.addElement("Konfiguration");
      tabNames.addElement("Hilfe");
  
      // Init Tabs
      tp = new JTabbedPane();
      JPanel tmpPanel;
      for(int i = 0; i &lt; tabNames.size(); i++)
      {
          tmpPanel = new JPanel();
          tp.addTab(tabNames.elementAt(i), tmpPanel);
      }
      tp.setFont(new Font("Calibri", Font.BOLD, 11));
      initPanelsInTabbedPane(tp);
      this.getContentPane().add(tp, BorderLayout.CENTER);
  }
  
  private void initPanelsInTabbedPane(JTabbedPane tp)
  {
      System.out.println("FestplattenreinigerGraphicalUserInterface::initPanelsInTabbedPane()");
  
      tp.getComponentAt(0).add(new JButton("HELLOSTUPIDJAVAIHATEU"));
  }
  </code></pre>
  
  <p>Well it says: 
  incompatible types
  found   : java.awt.Component
  required: javax.swing.JPanel
          JPanel p = tp.getComponentAt(0);</p>
  
  <p>But my book says that with, Component getComponentAt(int index), i can access it's content and i remember that JButton is a Component right? So wth?</p>