无思

本BLOG只用于个人资料收藏,内容如非注明,均为转贴资料,无意侵犯版权,特此声明!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

AWT
AWT provided an API for
building graphical components such as labels, text boxes, buttons, lists, and
menus and delegated to the operating system the task of providing its specific
implementation of the component. When you build an AWT text box, the operating
system constructs its text box and displays it on the application’s window—a
Java text box on Windows looks like a Windows text box, and a Java text box on
Macintosh looks like a Macintosh text box.


SWING
■ The controls did not match the look of the platform on which they where run.
 unable to keep up with changing operating systems.
■ The controls performed much worse compared to the native implementations.
 ultimately an emulated component can never perform as well as its native equivalent.
 A translation phase always occurs in the Java Virtual Machine (JVM), which
 converts the emulated component to a set of native painting instructions.

SWT
SWT is a set of widgets that accesses the native controls through the Java Native Interface
(JNI). Only those few controls that are not present on a particular OS are emulated.
The downside of this approach is that a native library is required for each
platform on which Eclipse/SWT is deployed. However, the benefit is that applications
look and perform as well as native applications. And, as of the 2.1 release
of Eclipse, SWT is supported on most major desktop operating systems and on
the Pocket PC.

 

posted on 2004-10-13 19:43  kavenmo  阅读(572)  评论(0)    收藏  举报