public static Object applyToAnnotatedObject( Object obj, String key, Object value )
		throws UnknownStyleException, IllegalArgumentException
	{
		String fieldName = keyToFieldName( key );

		return applyToField( obj, fieldName, key, value, field -> {
			Styleable styleable = field.getAnnotation( Styleable.class );
			return styleable != null && styleable.dot() == (fieldName != key);
		} );
	}
Applies the given value to an annotated field of the given object.
The field must be annotated with {@link Styleable}.

@param obj the object
@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