FlatLaf icon indicating copy to clipboard operation
FlatLaf copied to clipboard

Disable tab row rotation

Open tduva opened this issue 2 years ago • 0 comments

When there are several tab runs/rows they switch around so that the active tab is always in the bottom row. This means that the location of tabs constantly changes as tabs in different rows are selected, which can be irritating.

It's possible to turn this of by overwriting a method of the BasicTabbedPaneUI, for example when manually setting the UI in a JTabbedPane:

setUI(new FlatTabbedPaneUI() {
            
        @Override
        protected boolean shouldRotateTabRuns(int tabPlacement) {
                return false;
        }

});

However a property to disable this globally for all tab panes would be nice. Maybe something like TabbedPane.rotateTabRuns = false?

tduva avatar Aug 10 '22 10:08 tduva

thanks, implemented in latest snapshot: https://github.com/JFormDesigner/FlatLaf#snapshots

DevCharly avatar Aug 12 '22 13:08 DevCharly

Screenshot with TabbedPane.rotateTabRuns = false:

grafik

DevCharly avatar Aug 12 '22 14:08 DevCharly

Awesome, thanks. 👍

tduva avatar Aug 13 '22 20:08 tduva