From bf2227e1b8d9a3854b2bae8492929f2e9df2c98a Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Fri, 30 Jan 2026 12:58:17 +0100 Subject: [PATCH] Dialog: some client properties (e.g. `JRootPane.titleBarShowTitle`) did not work before the dialog was made visible (issue #1081) --- CHANGELOG.md | 2 ++ .../src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6bfc095..51403c14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ FlatLaf Change Log - ComboBox: Added UI property `ComboBox.buttonFocusedEditableBackground`. (issue #1068) +- Dialog: Some client properties (e.g. `JRootPane.titleBarShowTitle`) did not + work before the dialog was made visible. (issue #1081) - Popup: Fixed scrolling popup painting issue on Windows 10 when a glass pane is visible and frame is maximized. (issue #1071) - Slider: Styling `thumbSize` or `focusWidth` did not update slider size/layout. diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java index 9d689991..3c32be0a 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java @@ -484,7 +484,7 @@ public class FlatTitlePane } protected void frameStateChanged() { - if( window == null || rootPane.getWindowDecorationStyle() != JRootPane.FRAME ) + if( window == null || rootPane.getWindowDecorationStyle() == JRootPane.NONE ) return; updateVisibility();