Closed gitpicard closed 2 years ago
For reference, the demo jar has this bug as well. Happens on Windows 11.
Color.TRANSLUCENT
is not a color. This is an int
and therefor ignored by FlatLaf.
What you're probably seeing is the focused background, which is show when the tabbed pane is focused:
Please try with a real color. E.g.
UIManager.put("TabbedPane.selectedBackground", Color.GREEN);
I made a short clip of the issue. In this instance I commented out the code for the background selected color. As you can see, the simple act of switching focus changes the color.
Sorry, still don't see an issue here.
Looks like initially no component is focused.
Switching to other tabs does not focus the tabbed pane.
(only clicking selected tab moves focus to tabbed pane)
Then the window is deactivated and activated, which moves the focus to the first focusable component, which is the tabbed pane.
The orange tab background is color of TabbedPane.focusColor
, right?
If you select tab "Neues Project" and then click at "Projectname" text field, then focus should move to that text field and the orange tab background should be gone, right?
I have changed the background color on selection of the TabbedPane via
UIManager.put("TabbedPane.selectedBackground", Color.TRANSLUCENT);
This works just fine until I select a different app and then return to the app. After that the selected background color changes back to the accent default. Is there anything that can be done about this or a quick fix?