// Instantiate LayoutData instance.
Class propertyClass = Class.forName(type, true, classLoader);
LayoutData layoutData = (LayoutData) propertyClass.newInstance();
// Create introspector to analyze LayoutData class.
ComponentIntrospector ci = ComponentIntrospector.forName(type, classLoader);
// Set property values of LayoutData instance.
Iterator it = propertyStyle.getPropertyNames();
while (it.hasNext()) {
String propertyName = (String) it.next();
Method writeMethod = ci.getWriteMethod(propertyName);
writeMethod.invoke(layoutData, new Object[]{propertyStyle.getProperty(propertyName)});
}
return layoutData;
} catch (ClassNotFoundException ex) {