Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable tab row rotation #574

Closed
tduva opened this issue Aug 10, 2022 · 3 comments
Closed

Disable tab row rotation #574

tduva opened this issue Aug 10, 2022 · 3 comments
Milestone

Comments

@tduva
Copy link

tduva commented Aug 10, 2022

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?

@DevCharly
Copy link
Collaborator

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

@DevCharly DevCharly added this to the 2.5 milestone Aug 12, 2022
@DevCharly
Copy link
Collaborator

Screenshot with TabbedPane.rotateTabRuns = false:

grafik

@tduva
Copy link
Author

tduva commented Aug 13, 2022

Awesome, thanks. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants