1 Reply Latest reply on Aug 24, 2010 1:48 PM by 800390

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


      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!