void reset( Component contents, int ownerX, int ownerY ) {
			// update popup window location
			popupWindow.setLocation( ownerX, ownerY );

			// replace component in content pane
			Container contentPane = ((JWindow)popupWindow).getContentPane();
			contentPane.removeAll();
			contentPane.add( contents, BorderLayout.CENTER );
			popupWindow.pack();

			// update client property on contents
			if( this.contents != contents ) {
				Object old = (this.contents instanceof JComponent)
					? ((JComponent)this.contents).getClientProperty( KEY_POPUP_USES_NATIVE_BORDER )
					: null;
				if( contents instanceof JComponent )
					((JComponent)contents).putClientProperty( KEY_POPUP_USES_NATIVE_BORDER, old );

				this.contents = contents;
			}
		}
Fixes popup background flashing effect when using dark theme on light platform theme,
where the light popup background is shown for a fraction of a second before
the dark popup content is shown.
This is fixed by setting popup background to content background.
<p>
Defers hiding of heavy weight popup window for an event cycle,
which allows reusing popup window to avoid flicker when "moving" popup.
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java