Solved

Difference between Swing and AWT

Posted on 2002-05-09
4
520 Views
Last Modified: 2013-12-22
What the difference between Swing and AWT? Please tell me the advantages and disadvantages of both.
0
Comment
Question by:asukai
  • 2
4 Comments
 

Author Comment

by:asukai
ID: 6998311
Also, the situation when one of them is the most suitable.
0
 

Author Comment

by:asukai
ID: 6998316
And what they are
0
 
LVL 2

Expert Comment

by:CSuvendra
ID: 6998338
0
 

Accepted Solution

by:
paintor earned 50 total points
ID: 6998736
Swing is a newer and better API for windowing. The advantages are that it is easier, better constructed and follows the "java look and feel". Programming in swing is easier than the AWT. In all most all application writing situations use Swing. (providing all cleint machines will have a recent enough java virtual machine available. This is most probable

The exception is:

With swing, because it is "newer" many browsers dont support it on the internet. Therefore when writing internet based applications that use pop up windows, or applets on the client side, AWT is used for compatibility reasons, a much wider audience will be able to use and veiw applets written in this fashion since it has been around from the start and java enabled browsers will have AWT funtunality. So use AWT for internet stuff and situations where client machines might have an old Java virtual machine.


NOTE:
There are some third party tools that convert between Swing and AWT, i dont use these since you will get better code from scratch in ether method. Browsers can accept a plugin to display swing if the client machine does not have a recenbt enough java virtual machine, however clients have to install these, or accept the updates and it it seen as bad practice to use swing for online apps. I dont recommend using a tool to convert ether



Hope this answers your queries :-)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
hibernate example issues from command prompt 10 50
Adding multiple JVM environments to RedHat 6 7 49
add projects t working set in maven 2 24
hashmap order 17 37
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question