• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing & Awt  RSS feed

 
priya shankar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

Why AWT and Swing as they are doing the same work
priya
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AWT was there first; Swing is much newer, and builds on AWT.
They don't do the same work at all. AWT provides lowest-common-denominator access to the native window system's widget set. Swing provides a set of much more complex components which are drawn entirely from Java. Whereas AWT has the native platform's look-and-feel (well, sorta,) Swing implements pluggable platform-independent look-and-feels.
 
Jason Dobies
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To elaborate a bit on what Ernest said, you'll hear the terms "lightweight" and "heavyweight" thrown around a lot when discussing these two. AWT is heavyweight, like Ernest said they go down to native calls to render the components, which is often a pretty intensive call. Swing, on the other hand, is lightweight. Rendering most of the components im memory, Swing is typically much faster (I say typically because a lot of it still depends on code design).
My understanding is that Swing started as a project internal to Sun, it was a bunch of developers who just pieced together cool components from AWT components. It took off from there.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!