Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Difference between Swing and AWT

Posted on 2002-05-09
4
Medium Priority
?
525 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
 

Accepted Solution

by:
paintor earned 200 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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
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…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

670 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