In our application that has a JTabbedPane with unlimited tabs, when the width of the tabs exceeds the tabbed pane’s width, the tabs start wrapping into several rows. When you then click on a tab in one of the upper rows, the complete row comes down and to the foreground. For users who click around between several tabs, it’s highly confusing as it’s not possible to keep track of the tab order.
How can I either
– nail the tabs to fixed positions while bringing their contents to the front (though this would optically corrupt the tab metaphor but I don’t care), or
– limit the number of rows to one (so the tabs get very narrow instead of wrapping)?
Really quick and dirty (definitely needs improvements and changes), but I would imagine that something like that could work for you (but is not a JTabbePane):
The WrapLayout was taken from another post on SO.