public static void paintGrip( Graphics g, int x, int y, int width, int height,
		boolean horizontal, int dotCount, int dotSize, int gap, boolean centerPrecise )
	{
		dotSize = UIScale.scale( dotSize );
		gap = UIScale.scale( gap );
		int gripSize = (dotSize * dotCount) + (gap * (dotCount - 1));

		// calculate grip position
		float gx;
		float gy;
		if( horizontal ) {
			gx = x + Math.round( (width - gripSize) / 2f );
			gy = y + ((height - dotSize) / 2f);

			if( !centerPrecise )
				gy = Math.round( gy );
		} else {
			// vertical
			gx = x + ((width - dotSize) / 2f);
			gy = y + Math.round( (height - gripSize) / 2f );

			if( !centerPrecise )
				gx = Math.round( gx );
		}

		// paint dots
		for( int i = 0; i < dotCount; i++ ) {
			((Graphics2D)g).fill( new Ellipse2D.Float( gx, gy, dotSize, dotSize ) );
			if( horizontal )
				gx += dotSize + gap;
			else
				gy += dotSize + gap;
		}
	}
Paints a selection.
<p>
The bounds of the painted selection (rounded) rectangle are
{@code x + insets.left, y + insets.top, width - insets.left - insets.right, height - insets.top - insets.bottom}.
The given arc radius refers to the painted rectangle (and not to {@code x,y,width,height}).

@since 3
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java