File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Overlapping tabs in Windows XP LAF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Overlapping tabs in Windows XP LAF" Watch "Overlapping tabs in Windows XP LAF" New topic

Overlapping tabs in Windows XP LAF

Bob Novak

Joined: Oct 25, 2001
Posts: 8
I have a JTabbedPane with 3 tabs. Given the space allowed for the tabs, the first tabbed (titled Data Layers) is in front and the other 2 (Map Layers and Legend) are in back when the first displayed.

The problem is that the highlighting for the selected tab in the Windows XP LAF is an orange bar that increases the height of the front tab and obscures the text of the tabs in the "back". Selecting one of them, brings that tab run to the front with the same problem.

I took a look at JTabbedPane and did not find anything in the API to help; a look at the BasicTabbedPaneUI looks like it will lead to complications - it would be nice to have a simple solution.

I have also tried to adjust the preferred heights of the panel that contains the JTabbedPane (uses borderlayout and center placement) and the preferred size of the JTabbedPane itself to no avail. Is this the right approach? If so, I will pursue it further - but I was looking for some way to set the heights of the tabs or the area that the tabs occupy...

This is in an applet running with the 1.4.2 plugin under IE 6.0.

Any ideas would be appreciated. Thanks
I agree. Here's the link:
subject: Overlapping tabs in Windows XP LAF
It's not a secret anymore!