[2390] in java-interest

home help back first fref pref prev next nref lref last post

Re: peer classes?

daemon@ATHENA.MIT.EDU (Thomas Ball)
Sat Sep 30 07:19:26 1995

Date: Thu, 28 Sep 1995 12:55:11 -0700
From: tball@alapa@sun.com (Thomas Ball)
To: lemay@lne.com
Cc: java-interest@java@sun.com

If I understand Peers correctly, they allow the AWT's use of native
widgets -- the widgets function the same on different platforms, but
don't look the same.  This way, a dialog box implemented in Java will
look like a Windows dialog on Windows, Mac on Mac, etc.

One of the major problems with developing platform-independent code is
that a generic design doesn't provide platform's look-and-feel.  End-users
who have invested a lot in learning that platform are reluctant to
support apps which use a different interface (even if it only looks
different).  

Supporting native widgets from common code is a reasonable compromise 
for many apps.  It's not a perfect solution (style guidelines between
the various systems are too different), but the alternative is custom
coding each platform's UI -- too high a price for applets.

Tom

>  From daemon@java  Wed Sep 27 19:02:47 1995
>  X-Sender: lemay@slack.lne.com
>  Mime-Version: 1.0
>  To: java-interest@java
>  Subject: peer classes?
>  X-Info: To unsubscribe, send 'unsubscribe' to java-interest-request@java.sun.com
>  
>  
>  
>  The beta JDK comes with a package called java.awt.peer, which contains
>  Interface classes that parallel the classes in java.awt.
>  
>  Poking around in those classes, and in the source for AWT itself,
>  I'm seeing references that mention that the peers are used to
>  "modify the appearance of an object without changing its functionality."
>  
>  I'm afraid I don't understand what that means.  Could someone explain
>  that in a little more detail?  Why are the peers needed?  Isn't it
>  possible to change an object's appearance without changing its
>  functionality?
>  
>  Laura
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post