public static void revalidateAndRepaintAllFramesAndDialogs() {
		for( Window w : Window.getWindows() ) {
			if( isDisplayableFrameOrDialog( w ) ) {
				// revalidate menu bar
				JMenuBar menuBar = (w instanceof JFrame)
					? ((JFrame)w).getJMenuBar()
					: (w instanceof JDialog
						? ((JDialog)w).getJMenuBar()
						: null);
				if( menuBar != null )
					menuBar.revalidate();

				w.revalidate();
				w.repaint();
			}
		}
	}
Revalidate and repaint all displayable frames and dialogs.
<p>
Useful to update UI after changing {@code TitlePane.menuBarEmbedded}.

@since 1.1.2
flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java