title: JTabbedPane spacing
body: <p>Original Top tab orientation setting:</p>
  
  <p><a href="http://dl.dropbox.com/u/3238736/screenshots/Screenshot-PasswordStore-1.png" rel="nofollow noreferrer">http://dl.dropbox.com/u/3238736/screenshots/Screenshot-PasswordStore-1.png</a></p>
  
  <p>Problematic Right tab orientation setting:</p>
  
  <p><img src="https://i.stack.imgur.com/IsYVX.png" alt="enter image description here"></p>
  
  <p>From the GUI above, my JTabbedPane (the blue colour tab on the right) is overlapping the "Quit" button (which is rendered using a GlassPane).</p>
  
  <p>Note: Quit button is rendered onto top right using GlassPane. </p>
  
  <p>I would like some <em>technical</em> advise on moving the blue colour tab to give some spacing for the "Quit" button ?</p>
  
  <p>Codes for creating the GlassPane to insert the Quit button as shown below:</p>
  
  <pre><code>public void addUniversalQuitBtn() {
      // Thanks to http://www.java-forums.org/awt-swing/12267-how-add-jbutton-tabbed-pane-headder.html forum post regarding adding a button on glasspane.
      Rectangle tabBounds = mainTabPane.getBoundsAt(0);
      Container glassPane = (Container) this.getRootPane().getGlassPane();
      glassPane.setVisible(true);
      glassPane.setLayout(new GridBagLayout());
      GridBagConstraints gbc = new GridBagConstraints();
      gbc.weightx = 1.0;
      gbc.weighty = 1.0;
      gbc.fill = GridBagConstraints.NONE;
      gbc.insets = new Insets(tabBounds.y, 0, 0, 10);
      gbc.anchor = GridBagConstraints.NORTHEAST;
      quitBtn.setPreferredSize(new Dimension(quitBtn.getPreferredSize().width, (int) tabBounds.getHeight() - 2));
      glassPane.add(quitBtn, gbc);
  
  }
  </code></pre>
  
  <p>Thanks.</p>