Homework4 for Week 7&8

Performance:

The AWT uses a lot of the native commands of the platform that lends it a great amount of speed. But in order to convert it for use in other platforms, you must change the counterpart commands. Swing on the other hand uses pure Java code making it very portable across platforms at the cost of speed and performance.

Look:

Another feature of swing is that it tries to emulate the look and feel of the OS that it is running on, making it resemble the native environment. This is beaten by AWT since it uses native commands; it looks exactly what the native UI looks like.

Portability:

Swing supports a lot more features than what AWT does. The added features and the pure java design of swing though means that you would require the java plug-in in order for the program to run, while most of the browsers today already support the AWT classes that eliminates the need for plug-in downloads.

Summarize:

If you would like to create simple java applets ---- fast and easy AWT.
But if you want to create a full blown application ---- Swing.

<< Hommwork3

Week7&8 Home

Hommwork5 >>

Copyright © 周钊平(Zhou Zhaoping)