title: JTabbedPane will not fill entire JPanel
body: <p>I am adding a JTabbedPane to my JPanel and I can get it to stretch to the edges but the JTabbedPane is still leaving an ugly border around it. I thought the edges you just merge with the edges of the window. Does anyone know how to make it do that? Here is a picture of what I am seeing.</p>
  
  <p><img src="https://i.stack.imgur.com/vrgdy.png" alt="enter image description here"></p>
  
  <p>Here is my method that creates the layout:</p>
  
  <pre><code>public class MainFrame extends JFrame {
      private static final long serialVersionUID = 6112493789711533870L;
      private final int FRAME_WIDTH = 720;
      private final int FRAME_HEIGHT = 405;
  
      private JPanel mainLayout;
      GridBagConstraints c = new GridBagConstraints();
  
      public MainFrame(String t) {
          super(t);
          setSize(FRAME_WIDTH, FRAME_HEIGHT);
          add(createLayout());
      }
  
      public JPanel createLayout() {
          this.mainLayout = new JPanel(new GridBagLayout());
          JTabbedPane mainTabs = new JTabbedPane();
          mainTabs.setTabPlacement(JTabbedPane.LEFT);
  
          JComponent projectPanel = makeTextArea();
          mainTabs.addTab("Projects", projectPanel);
  
          JComponent tasksPanel = makeTextArea();
          mainTabs.addTab("Tasks", tasksPanel);
  
          JComponent optionsPanel = makeTextArea();
          mainTabs.addTab("Options", optionsPanel);
  
          c.fill = GridBagConstraints.BOTH;
          c.weightx = 1.0;
          c.weighty = 1.0;
          c.insets = new Insets(0,0,0,0);
  
          mainLayout.add(mainTabs, c);
          return mainLayout;
      }
  
      private JScrollPane makeTextArea() {
          JTextArea textArea = new JTextArea();
          textArea.setEditable(true);
  
          JScrollPane scrollTextArea = new JScrollPane(textArea);
          scrollTextArea.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
  
          return scrollTextArea;
      }
  } 
  </code></pre>