• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

AWT vs. Swing

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the difference between using AWT components to create a user interface vs. using Swing? I am confused...
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The AWT components are "heavyweight" in that they have a peer component on the operating system. this makes their look and feel dependant on which OS you are running. The Swing components are less tied to the peer and are called "lightwieght". This is a pro for Swing.
There were some bugs and design problems with the AWT that were corrected in Swing.
Swing is much more powerful and much more flexible.
Swing is therefore much more difficult to use (some would say tempermental . . . ). Increased flexibility is approximately equal to increased complexity.
Swing comes with a whole new set of bugs and design problems . . .
Most browsers only support up to 1.1.8 without a plug-in. Plug-ins require the end user to do a download - so some people try to avoid this. Swing didn't come out until jdk1.3 - so using Swing virtually requires a plug-in if it is to be used in a browser.

 
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is an excellent article stretching the differences between awt and Swing.
http://java.sun.com/products/jfc/tsc/articles/mixing/index.html
W.
 
reply
    Bookmark Topic Watch Topic
  • New Topic