protected void paintIcons( Graphics g, Rectangle r ) {
		boolean ltr = isLeftToRight();
		Icon leftIcon = ltr ? leadingIcon : trailingIcon;
		Icon rightIcon = ltr ? trailingIcon : leadingIcon;

		// paint left icon
		if( leftIcon != null ) {
			int x = r.x;
			int y = r.y + Math.round( (r.height - leftIcon.getIconHeight()) / 2f );
			leftIcon.paintIcon( getComponent(), g, x, y );

			// update rectangle so that subclasses can use it
			int w = leftIcon.getIconWidth() + scale( iconTextGap );
			r.x += w;
			r.width -= w;
		}

		// paint right icon
		if( rightIcon != null ) {
			int iconWidth = rightIcon.getIconWidth();
			int x = r.x + r.width - iconWidth;
			int y = r.y + Math.round( (r.height - rightIcon.getIconHeight()) / 2f );
			rightIcon.paintIcon( getComponent(), g, x, y );

			// update rectangle so that subclasses can use it
			r.width -= iconWidth + scale( iconTextGap );
		}
	}
Paints the leading and trailing icons in the given rectangle.
The rectangle is updated by this method so that subclasses can use it
without painting over leading or trailing icons.

@since 2
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTextFieldUI.java