Why do Windows Forms / Swing frameworks favour inheritance instead of Composition?

Posted by devoured elysium on Programmers See other posts from Programmers or by devoured elysium
Published on 2011-05-25T21:27:40Z Indexed on 2011/06/25 8:30 UTC
Read the original article Hit count: 284

Filed under:
|
|
|

Today a professor of mine commented that he found it odd that while SWT's philosophy is one of making your own controls by composition, Swing seems to favour inheritance.

I have almost no contact with both frameworks, but from what I remember in C#'s Windows Forms one usually extends controls, just like Swing.

Being that generally people tend to prefer composition over inheritance, why didn't Swing/Windows Forms folks favour composition instead of inheritance?

© Programmers or respective owner

Related posts about c#

Related posts about java