What should I do if I encounter an InstantiationException or other error using a custom widget?
An InstantiationException means that Designer could not create an instance of a particular class. The most common reason for this is that the component is not a valid custom widget. In order to be a valid Swing or GWT widget, a class must be a valid Java Bean and have a public, zero-argument constructor. SWT widgets must have a public two-argument constructor with parent and style bits as the two arguments. To fix the problem, add the missing constructor. Note: the Java Bean conventions (slightly modified for SWT) are important from a GUI builder point of view as they establish a common, expected, and, for the most part, self documenting API. If you create your own unique constructors, your are, in effect, creating your own personal API which makes it difficult for a GUI builder to reflectively interact with your components. Generating code to a custom constructor API requires knowledge of the API that generally is not provided by the component. That requires hard coding knowledge of t