void (@NotNull Window window, @NotNull JRootPane rootPane) { try { Object platformWindow = getPlatformWindow(window); if (platformWindow == null) { return; } Field field = platformWindow.getClass().getDeclaredField("CLIENT_PROPERTY_APPLICATOR"); field.setAccessible(true); Object clientPropertyApplicator = field.get(platformWindow); Method method = ReflectionUtil.getMethod(clientPropertyApplicator.getClass(), "attachAndApplyClientProperties", JComponent.class); if (method != null) { method.invoke(clientPropertyApplicator, rootPane); } } catch (Throwable e) { LOG.debug(e); } finally { // https://youtrack.jetbrains.com/issue/IDEA-323593 window.revalidate(); } }