title: JButton not appearing on JPanel
body: <p>I have been trying to learn how to use layout manages in java, I have the following code that trys to add the class "StartButton", startbutton is just a class that extends JButton</p>
  
  <p>When I run the code my JFrame is loaded properly and the JPanel is created, I also added a print to layoutItems() to insure that the function is being called.</p>
  
  <p>This is my JPannel code;</p>
  
  <pre><code>import java.awt.Color;
  import java.awt.Dimension;
  import java.awt.Graphics;
  import java.awt.GridBagConstraints;
  import java.awt.GridBagLayout;
  
  import javax.swing.JPanel;
  
  public class menuPanel extends JPanel {
  
      private static final long serialVersionUID = 1L;
  
      private static final Color BG_COLOR = new Color(0xfaf8ef);
  
  
      private startButton startbutton;
  
      public menuPanel(){
          this.setOpaque(false);
          this.setPreferredSize(new Dimension(300, 400));
          this.setBackground(new Color(107, 106, 104));
          this.setVisible(true);
          setLayout(new GridBagLayout());
  
          startbutton = new startButton();
  
          layoutItems();
      }
  
      @Override
      public void paint(Graphics g) {
          super.paint(g);
          g.setColor(BG_COLOR);
          g.fillRect(0, 0, this.getSize().width, this.getSize().height);
      }
  
  
      public void layoutItems(){
          GridBagConstraints c = new GridBagConstraints();
          System.out.println("lol");
          c.weightx = 0.25;
          c.weighty = 0.175;
          c.gridwidth = 2;
          c.gridx = 1;
          c.gridy = 6;
          this.add(startbutton, c);
      }
  }
  </code></pre>