diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java index ff3fac17..46d826f6 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/DemoFrame.java @@ -750,8 +750,19 @@ class DemoFrame boolean supportsWindowDecorations = UIManager.getLookAndFeel() .getSupportsWindowDecorations() || FlatNativeWindowBorder.isSupported(); - windowDecorationsCheckBoxMenuItem.setEnabled( supportsWindowDecorations && !JBRCustomDecorations.isSupported() ); - menuBarEmbeddedCheckBoxMenuItem.setEnabled( supportsWindowDecorations ); + + // If the JetBrainsRuntime is used, it forces the use of it's own custom + // window decoration, meaning we can't use our own. + if( !supportsWindowDecorations || JBRCustomDecorations.isSupported() ) { + windowDecorationsCheckBoxMenuItem.setEnabled( false ); + windowDecorationsCheckBoxMenuItem.setSelected( false ); + windowDecorationsCheckBoxMenuItem.setToolTipText( "Not supported on your system." ); + } + if( !supportsWindowDecorations ) { + menuBarEmbeddedCheckBoxMenuItem.setEnabled( false ); + menuBarEmbeddedCheckBoxMenuItem.setSelected( false ); + menuBarEmbeddedCheckBoxMenuItem.setToolTipText( "Not supported on your system." ); + } // remove contentPanel bottom insets MigLayout layout = (MigLayout) contentPanel.getLayout();