title: MigLayout - selective component fill
body: <p>I am trying to add a <code>JTabbedPane</code> to a panel, with buttons above it for controls. I am using MigLayout.</p>
  <p>But, I cannot get the <code>JTabbedPane</code> to fill without the buttons also filling when they don't need to.</p>
  <p>Take the following SSCCE:</p>
  <pre><code>public static void main(String[] args) {
      JPanel panel = new JPanel(new MigLayout(new LC().fill()));
      panel.add(new JButton(&quot;+&quot;));
      panel.add(new JButton(&quot;-&quot;), &quot;wrap&quot;);
      panel.add(new JTabbedPane(), &quot;span, grow&quot;);
      JFrame frame = new JFrame();
      frame.add(panel);
      frame.setSize(new Dimension(300, 500));
      frame.setLocationRelativeTo(null);
      frame.setVisible(true);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }
  </code></pre>
  <p>This produces a panel that looks like this:</p>
  <p><img src="https://i.stack.imgur.com/0oDDd.png" alt="enter image description here" /></p>
  <p>But, if I remove <code>fill()</code> from the layout constraints (<code>JPanel panel = new JPanel(new MigLayout(new LC()));</code>), it looks like this:</p>
  <p><img src="https://i.stack.imgur.com/gavz3.png" alt="enter image description here" /></p>
  <p>How do I make the <code>JTabbedPane</code> to fill the content area while the <code>JButton</code>s do not fill?</p>