using writeMethod to write on a property of an object?
<p>Hi guys I have a problem that makes me really confused, I have 'writeMethod' which is a type of Method class, 'dpv' which is a type of a propertyDescriptor, i retrieved the writeMethod of the object by getWriteMethod(), now my problem is how to set 'writeMethod' to write on a property of an object (e.g. JLabel, JButton) here is my code :</p>

<pre><code> if(dpv.getPropertyType().isPrimitive() 
         || dpv.getPropertyType().isInstance("Integer") )
        {
            Method writeMethod = dpv.getWriteMethod();

            //setWriteMethod(writeMethod);&lt;---------- Not sure about this part (doesn't work)

            System.out.println(writeMethod);
            PropertyValue.setEnabled(true);
            SetButton.setEnabled(true);
        }
        else{

            PropertyValue.setEnabled(false);
            SetButton.setEnabled(false);
        }
</code></pre>

<p>Thanks for your help guys</p>
