--- old/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java 2018-03-28 14:54:27.000000000 +0530 +++ new/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java 2018-03-28 14:54:26.000000000 +0530 @@ -101,6 +101,7 @@ // for client properties public static final String WINDOW_BRUSH_METAL_LOOK = "apple.awt.brushMetalLook"; public static final String WINDOW_DRAGGABLE_BACKGROUND = "apple.awt.draggableWindowBackground"; + public static final String WINDOW_DARK_APPEARANCE = "apple.awt.windowDarkAppearance"; public static final String WINDOW_ALPHA = "Window.alpha"; public static final String WINDOW_SHADOW = "Window.shadow"; @@ -148,6 +149,7 @@ static final int IS_DIALOG = 1 << 25; static final int IS_MODAL = 1 << 26; static final int IS_POPUP = 1 << 27; + static final int DARK_TITLE_BAR = 1 << 28; static final int _STYLE_PROP_BITMASK = DECORATED | TEXTURED | UNIFIED | UTILITY | HUD | SHEET | CLOSEABLE | MINIMIZABLE | RESIZABLE; @@ -230,7 +232,10 @@ final String filename = ((java.io.File)value).getAbsolutePath(); c.execute(ptr->nativeSetNSWindowRepresentedFilename(ptr, filename)); - }} + }}, + new Property(WINDOW_DARK_APPEARANCE) { public void applyProperty(final CPlatformWindow c, final Object value) { + c.setStyleBits(DARK_TITLE_BAR, value == null ? true : Boolean.parseBoolean(value.toString())); + }}, }) { @SuppressWarnings("deprecation") public CPlatformWindow convertJComponentToTarget(final JRootPane p) { @@ -468,6 +473,11 @@ if (prop != null) { styleBits = SET(styleBits, DRAGGABLE_BACKGROUND, Boolean.parseBoolean(prop.toString())); } + + prop = rootpane.getClientProperty(WINDOW_DARK_APPEARANCE); + if (prop != null) { + styleBits = SET(styleBits, DARK_TITLE_BAR, Boolean.parseBoolean(prop.toString())); + } } if (isDialog) {