private static void setupRoundedBorderImpl( Window popupWindow, int borderCornerRadius, float borderWidth, Color borderColor ) {
		if( SystemInfo.isWindows ) {
			// get native window handle
			long hwnd = FlatNativeWindowsLibrary.getHWND( popupWindow );

			// set corner preference
			int cornerPreference = (borderCornerRadius <= 4)
				? FlatNativeWindowsLibrary.DWMWCP_ROUNDSMALL  // 4px
				: FlatNativeWindowsLibrary.DWMWCP_ROUND;      // 8px
			FlatNativeWindowsLibrary.setWindowCornerPreference( hwnd, cornerPreference );

			// set border color
			FlatNativeWindowsLibrary.dwmSetWindowAttributeCOLORREF( hwnd, FlatNativeWindowsLibrary.DWMWA_BORDER_COLOR, borderColor );
		} else if( SystemInfo.isMacOS ) {
			if( borderColor == null || borderColor == FlatNativeWindowsLibrary.COLOR_NONE )
				borderWidth = 0;

			// set corner radius, border width and color
			FlatNativeMacLibrary.setWindowRoundedBorder( popupWindow, borderCornerRadius,
				borderWidth, (borderColor != null) ? borderColor.getRGB() : 0 );
		}
	}
Checks whether the owner component returns a tooltip location in
JComponent.getToolTipLocation(MouseEvent).
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java