Code the constructor

A class constructor is normally used to initialize instance-specific data. However, if your component implements a control interface, then you should use the control interface methods to manage instance-specific data. Otherwise, instance-specific initialization must be done in the constructor.

Any uncaught exception that is thrown within the constructor aborts the creation of the new component instance.