private Dimension applyExtraSize( Dimension size ) {
		// add width of leading and trailing icons
		size.width += getLeadingIconWidth() + getTrailingIconWidth();

		// add width of leading and trailing components
		for( JComponent comp : getLeadingComponents() ) {
			if( comp != null && comp.isVisible() )
				size.width += comp.getPreferredSize().width;
		}
		for( JComponent comp : getTrailingComponents() ) {
			if( comp != null && comp.isVisible() )
				size.width += comp.getPreferredSize().width;
		}

		return size;
	}
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