I'm trying to create this basic GUI, but cannot get my panels to setup correctly.(Numbers are pixel sizes)

![GUI](https://i.imgur.com/Yk53u8T.png)

I've tried using this tutorial as a reference (<http://www.youtube.com/watch?v=Kl3klve_rmQ>) but, mine never works the same.

My code declares variables in the top of the class, then creates a constructor which add the components (panels, buttons, etc), then it calls the constructor in the main method.

```
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

```

public class FinalProject extends JPanel 
{

```
private static final long serialVersionUID = 1L;

static JPanel nav;
static JPanel queue;
static JPanel menu;

GridBagConstraints gbc = new GridBagConstraints();

public FinalProject() 
{

    nav = new JPanel();
    nav.setLayout(new GridBagLayout());
    nav.setBackground(Color.RED);
    gbc.gridy = 0;
    gbc.gridx = 0;
    gbc.gridheight = 1;
    gbc.gridwidth = 1;
    add(nav, gbc);

    queue = new JPanel();
    queue.setLayout(new GridBagLayout());
    queue.setBackground(Color.GREEN);
    gbc.gridy = 1;
    gbc.gridx = 1;
    gbc.gridheight = 1;
    gbc.gridwidth = 1;
    add(queue, gbc);

    menu = new JPanel();
    menu.setLayout(new GridBagLayout());
    menu.setBackground(Color.BLUE);
    gbc.gridy = 2;
    gbc.gridx = 2;
    gbc.gridheight = 1;
    gbc.gridwidth = 1;
    add(menu, gbc);
}

public static void main(String[] args) 
{       
    FinalProject p = new FinalProject();
    JFrame f = new JFrame();

    f.add(nav);
    f.add(queue);
    f.add(menu);

    f.setTitle("Subway");
    f.setSize(800, 500);
    f.setLocationRelativeTo(null);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setVisible(true);
    f.setResizable(false);
    f.add(p);
}

```

}

How should I go about getting this layout right? Panels in Panels, Panels independent of each other, etc.?