public static Object applyToAnnotatedObjectOrComponent( Object obj, Object comp, String key, Object value )
		throws UnknownStyleException, IllegalArgumentException
	{
		try {
			return applyToAnnotatedObject( obj, key, value );
		} catch( UnknownStyleException ex ) {
			try {
				if( comp != null )
					return applyToProperty( comp, key, value );
			} catch( UnknownStyleException ex2 ) {
				// ignore
			}
			throw ex;
		}
	}
Applies the given value to an annotated field of the given object
or to a property of the given component.
The field must be annotated with {@link Styleable}.
The component property must have public getter and setter methods.

@param obj the object
@param comp the component, or {@code null}
@param key the name of the field
@param value the new value
@return the old value of the field
@throws UnknownStyleException if object does not have an annotated field with given name
@throws IllegalArgumentException if value type does not fit to expected type
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatStylingSupport.java