Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] Subclassing Widgets..

Samir.

I read the document and understand the consequences of subclassing. But the Subclassing is a feature of any object-oriented language and when someone creates a subclass he/she is aware of consequences the subclassing can have. In my case I wanted to subclass the component to add some extra features like my custom table with few predefined menu whose functionality is fixed. These things can be achieved from composition but that is not the right way to do in case of Java.

If you are aware of the consequences and accept that responsibility, the go ahead and subclass any widgets that you like. Just be aware that your subclass might not be portable across platforms and might break in a future release. Aside from that, most SWT widgets can be subclassed quite easily.

-Eric



Back to the top