Monday, August 13, 2012
AWT:
Pros
1. Speed: use of native peers speeds component performance.
2. Applet Portability: most Web browsers support AWT classes so
AWT applets can run without the Java plugin.
3. Look and Feel: AWT components more closely reflect the look
and feel of the OS they run on.
Cons
1. Portability: use of native peers creates platform specific
limitations. Some components may not function at all on some
platforms.
2. Third Party Development: the majority of component makers,
including Borland and Sun, base new component development on
Swing components. There is a much smaller set of AWT
components available, thus placing the burden on the programmer
to create his or her own AWT-based components.
3. Features: AWT components do not support features like icons and tool-tips.
Swing:
Pros
1. Portability: Pure Java design provides for fewer platform specific
limitations.
2. Behavior: Pure Java design allows for a greater range of behavior
for Swing components since they are not limited by the native peers that AWT uses.
3. Features: Swing supports a wider range of features like icons and
pop-up tool-tips for components.
4. Vendor Support: Swing development is more active. Sun puts
much more energy into making Swing robust.
5. Look and Feel: The pluggable look and feel lets you design a
single set of GUI components that can automatically have the look
and feel of any OS platform (Microsoft Windows, Solaris,
Macintosh, etc.). It also makes it easier to make global changes to
your Java programs that provide greater accessibility (like picking
a hi-contrast color scheme or changing all the fonts in all dialogs,
etc.).
Cons
1. Applet Portability: Most Web browsers do not include the Swing
classes, so the Java plugin must be used.
2. Performance: Swing components are generally slower and buggier than AWT, due to both the fact that they are pure Java and to video issues on various platforms. Since Swing components handle their own painting (rather than using native API's like DirectX on Windows) you may run into graphical glitches.
3. Look and Feel: Even when Swing components are set to use the
look and feel of the OS they are run on, they may not look like
their native counterparts.
Pros
1. Speed: use of native peers speeds component performance.
2. Applet Portability: most Web browsers support AWT classes so
AWT applets can run without the Java plugin.
3. Look and Feel: AWT components more closely reflect the look
and feel of the OS they run on.
Cons
1. Portability: use of native peers creates platform specific
limitations. Some components may not function at all on some
platforms.
2. Third Party Development: the majority of component makers,
including Borland and Sun, base new component development on
Swing components. There is a much smaller set of AWT
components available, thus placing the burden on the programmer
to create his or her own AWT-based components.
3. Features: AWT components do not support features like icons and tool-tips.
Swing:
Pros
1. Portability: Pure Java design provides for fewer platform specific
limitations.
2. Behavior: Pure Java design allows for a greater range of behavior
for Swing components since they are not limited by the native peers that AWT uses.
3. Features: Swing supports a wider range of features like icons and
pop-up tool-tips for components.
4. Vendor Support: Swing development is more active. Sun puts
much more energy into making Swing robust.
5. Look and Feel: The pluggable look and feel lets you design a
single set of GUI components that can automatically have the look
and feel of any OS platform (Microsoft Windows, Solaris,
Macintosh, etc.). It also makes it easier to make global changes to
your Java programs that provide greater accessibility (like picking
a hi-contrast color scheme or changing all the fonts in all dialogs,
etc.).
Cons
1. Applet Portability: Most Web browsers do not include the Swing
classes, so the Java plugin must be used.
2. Performance: Swing components are generally slower and buggier than AWT, due to both the fact that they are pure Java and to video issues on various platforms. Since Swing components handle their own painting (rather than using native API's like DirectX on Windows) you may run into graphical glitches.
3. Look and Feel: Even when Swing components are set to use the
look and feel of the OS they are run on, they may not look like
their native counterparts.
Labels:Java FAQs
Subscribe to:
Post Comments
(Atom)
Total Pageviews
Followers
Labels
- Algorithms (7)
- Annotation (3)
- Files (6)
- Generics (3)
- Graphics2D (5)
- Graphics2D-Images (7)
- Inheritance (2)
- J2EE (9)
- Java 8 (4)
- Java FAQs (19)
- JDBC (3)
- Networking (2)
- Packages (1)
- Reflection (4)
- Security (7)
- Sorting (2)
- Swing (3)
- Threads (3)
- Utils (3)
Popular Posts
-
Today I will show you how you can implement Bankers algorithm in Java. The Banker's algorithm is a resource allocation and deadlock a...
-
------------------------- UPDATE ------------------------- I have updated the code on request of some followers so that they can directly...
-
Today I am going to show how to convert a postfix expression to an infix expression using stack in Java. In an earlier post here we ...
-
Today in this article I will tell you how to convert an infix expression to postfix expression using stack. This is an important applicat...
-
--------------------UPDATE------------------- I have updated my post so that now it can detect IE 11. This modification was necessary as t...
-
Today I am going to show you how you can generate and validate captcha. A CAPTCHA (an acronym for "Completely Automated Public Turin...
-
Today I am going to post a program that will be able to produce all the mColorings of a given graph G. What is mColoring : The problem st...
-
Today in this article I will show you how to create or develop a Tower of Hanoi game in Java. The Tower of Hanoi is a famous problem tha...
Links
Blog Archive
-
▼
2012
(
25
)
-
▼
August
(
8
)
- Differences between AWT and Swing
- How to set Java compiler's path in Windows7
- What is the difference between import and #include...
- What is a JIT compiler in Java ?
- Why cant you declare a class private ?
- Java program to create Bubbles using Graphics2D
- Rotate Text in Java using Graphics2D transform
- Java program to draw partially transparent image
-
▼
August
(
8
)
0 comments:
Post a Comment