public static FlatBorder getOutsideFlatBorder( JComponent c ) {
		Border border = c.getBorder();
		for(;;) {
			if( border instanceof FlatBorder )
				return (FlatBorder) border;
			else if( border instanceof CompoundBorder )
				border = ((CompoundBorder)border).getOutsideBorder();
			else
				return null;
		}
	}
Returns the scaled arc diameter of the border for the given component.
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java