This discussion is archived
1 Reply Latest reply: Aug 24, 2010 6:48 AM by 800390 RSS

PropertyDescriptor.isBound() returns "true" for text-property of JTextField

800390 Newbie
Currently Being Moderated

I have this simple code to retrieve all bound properties of a JTextField:
BeanInfo beanInfo = Introspector.getBeanInfo( JTextField.class );
PropertyDescriptor[] discriptors = beanInfo.getPropertyDescriptors();
for ( PropertyDescriptor propertyDescriptor : discriptors ) {
     System.out.println( "propertyDescriptor.getDisplayName(): " + propertyDescriptor.getDisplayName() );
     System.out.println( "propertyDescriptor.isBound(): " + propertyDescriptor.isBound() );
When I run this, I can see that the property "text" is listet as "bound" (isBound() == true ). I know there is no JTextFieldBeanInfo, so the Introspector does a runtime introspection. And I know that "text" is not a bound property on JTextField. So why is "isBound()" reporting "true" for the "text" property? (I was hoping to get all bound properties of a class this way, but appearently it does not word).

Thanks a lot for your help!