On Wed, Oct 06, 1999 at 11:18:13AM -0400, Jacob Nikom wrote:
> Hi,
> 

> I am interested in this discussion, but I am trying to convert it
> into more plain English. I always thought that the lightweight
> components are peerless.  

Swing still needs some heaviweight componentes, namely the AWT Frame,
to do basic communication with the underlying GUI. This is true for
all platforms. 

>They don't need X libraries and work "directly" with OS and hardware.

This is simply not true. Swing does not have any interface with the
hardware, that would make it really heaviweight and completely
platform dependent. In addition interfacing with the OS doesn't
provide graphic management on Unix were the OS and GUI are two,
fortunately, separate entities. On Window and MacOS the distiction is
blurred, in that case the AWT basic services connects to the GUI API
and Swing operates on top of this interface.

> Swing was claimed as lightweight component based package, so it
> should not need X or Windows.

See above.Without connection with X or Windows how do you do GUI
management ?

> On contrary, AWT was claimed to be
> heavyweight based component package, that is why it needs X - is it
> true? Is it different on Solaris, Windows or Linux?

AWT was attempting to create a peer class for each GUI element. This
approach doesn't work on multiple platforms since diferent GUIs have
different features. AWT was forced to be limited to the lowest common
denominator. Swing, requiring only some basic heaviweight services,
can create the same type of UI on multiple platform even providing
features that are not present in the native GUI.

>  Also, "libXm appears to be statically linked into libawt.so" - does
>  it mean that X modules were compiled and placed into libawt.so
>  library, so in reality you call X, but you don't need to link with
>  it?

libXm is actually part of Motif, not X. AWT uses Motif in the peer
classes. Likewise the first implementation of AWT for Windows used
MFC. Motif provides the Frame, cut-and-paste and other basic services
for AWT and in turn Swing. You have two options with Motif: static and
dynamic. With dynamic linking the user must have an installed version
of Motif in order to run you application. Since Motif costs a lot of
money you cannot put this constraint to you users . If you statically
link the Motif library the whole issue goes away. That's what
Netscape does.

--Paolo


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to