Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: Re: [platform-swt-dev] Some questions for the SWT developers

> AWT widgets are "heavyweight" like SWT ones but still they don't need a
> parent argument in their constructor! I can't believe that an OS
> needs a parent
> reference for creating a widget. Which OS needs this? How is AWT
> able to do it without?

AWT basically duplicates all relevant information in the Java object. It
holds all info (like text, size, font, etc) until the peer is realized in
addNotify. During addNotify, the details are passed to the peer object being
created.

The tradeoff here is bloat (the extra copy of the info in AWT) vs.
parameters to constructor (SWT).

-- Scott



Back to the top