Original Top tab orientation setting:
http://dl.dropbox.com/u/3238736/screenshots/Screenshot-PasswordStore-1.png
Problematic Right tab orientation setting:
From the GUI above, my JTabbedPane (the blue colour tab on the right) is overlapping the "Quit" button (which is rendered using a GlassPane).
Note: Quit button is rendered onto top right using GlassPane.
I would like some technical advise on moving the blue colour tab to give some spacing for the "Quit" button ?
Codes for creating the GlassPane to insert the Quit button as shown below:
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);
}
Thanks.