DefaultComponentHandler |
From JAXXWiki
DefaultComponentHandler is a subclass of DefaultObjectHandler which provides support for java.awt.Component and its subclasses.
DefaultComponentHandler is a minor extension of DefaultObjectHandler. The biggest change it makes is the addition of support for the x, y, width, and height properties, which would otherwise be unsupported (there are no methods in Component named setX(), setY(), setWidth(), or setHeight()).
The width and height properties
The width and height attributes require special support for two reasons: first, there is no setWidth() or setHeight() method (only setSize()), and second, even if there were they generally wouldn't do anything. As a component's size is dictated by its parent container's layout manager, any change to its width or height properties would be ignored during layout.
To combat this problem, assigning the width or height property also modifies the minimumWidth, preferredWidth, minimumHeight, and preferredHeight properties as appropriate. This (generally) causes layout managers to respect your settings and size the object appropriately.

