-
-
Notifications
You must be signed in to change notification settings - Fork 314
Description
We are using FlatLaf (version 3.6) in a NetBeans Platform application (RELEASE111, NetBeans 11.1) and have encountered an issue with customizing the active and inactive tab colors for TabDisplayer components, which are part of the NetBeans windowing system. The default styling results in unselected tabs appearing as a harsh grey, which we aim to replace with more subtle, customizable colors (e.g., light grey for inactive, white for active).
Steps to Reproduce
- Set up a NetBeans Platform application using RELEASE111 (NetBeans 11.1).
- Integrate FlatLaf 3.6 via Maven dependency:
<dependency>
<groupId>com.formdev</groupId>
<artifactId>flatlaf</artifactId>
<version>3.6</version>
</dependency>- Attempt to register a custom UI delegate or set UIManager properties for TabDisplayer:
UIManager.setLookAndFeel(new FlatLightLaf());
UIManager.put("ProgressBarUI", "com.formdev.flatlaf.ui.FlatProgressBarUI");
UIManager.put("JideTabbedPane.selectedTabBackground", Color.GREEN);
UIManager.put("TabDisplayer.unselectedBackground", Color.RED); // Test color
UIManager.put("TabDisplayer.selectedBackground", Color.GREEN); // Test colorRun the application and observe the TabDisplayer. Note that the custom colors (RED/GREEN) do not apply, and unselected tabs retain the default grey background.
Expected Behavior
Active tabs (e.g., "SOne !!" / "One !!") should display a custom background color (e.g., white or green).
Inactive tabs (e.g., "Two !!") should display a custom background color (e.g., light grey or red).
Actual Behavior
The TabDisplayer retains its default grey background for inactive tabs, ignoring UIManager settings.
The custom UI delegate is not applied (verified via UI inspector showing the default delegate).
JIDE-based tabs (e.g., "Job View", "Task", "All") styled with JideTabbedPane.selectedTabBackground (set to GREEN) work correctly, indicating the issue is specific to TabDisplayer.
Component Hierarchy
-
In Code (TopComponent):
-
Tabs are implemented using
TopComponentclasses (e.g., for "SOne !!", "One !!", "Two !!"), which are managed by the NetBeans windowing system and rendered viaTabDisplayer. -
These are registered with the window system, triggering
TabDisplayerrendering.
-
-
In UI Inspector (Screenshot Attached):
- Hierarchy (from attached screenshot):
JFrame > JRootPane > JLayeredPane > MainWindow > JDesktopPane > MultiSplitPane > DefaultSplitContainer$ModePanel > TabbedAdapter > TabDisplayer.
* The TabDisplayer is the component rendering the tabs, with the UI delegate determining the visual style.
Environment
- FlatLaf Version: 3.6
- NetBeans Platform: RELEASE111 (NetBeans 11.1)
- Java Version: 21
- OS: Windows 16