aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes What does this mean? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "What does this mean?" Watch "What does this mean?" New topic
Author

What does this mean?

Brian Smith
Ranch Hand

Joined: Oct 26, 2002
Posts: 232
hi all,
I found the following as an introductory definition of AWT:
AWT components match exactly the form of corresponding components in
the operating system, so their appearance is platform dependent.

I am wondering how do AWT components match exactly the form of corresponding components in the operating system? is that the OS contains AWT-like components? could you please explain me this?
I also found this:
An important difference between Swing and AWT is that Swing creates its components using "Pluggable Look & Feel" (PLAF) modules that do not use native code.
IBM

What does "modules that do not use native code" mean?
thanks.
[ August 24, 2003: Message edited by: Namaste Sathi ]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Basically, the difference is that AWT makes calls to native GUI components to the OS. So in some DLL or .SO file somewhere, there is a drawing definition for a Button that the OS uses to draw it's Buttons. AWT makes these same calls to the OS to draw Buttons for the AWT. This makes AWT a bit faster that SWING but also limits your components to that which the OS provides for you. It also causes your applications to look different on different OS's.
SWING draws all it's own components using the PLAF which uses the Graphics2D API. So instead of the OS drawing the Button, SWING actually draws it's own. This also makes swing a bit slower than AWT but the tradeoff is well worth the loss in performance. With SWING components, you aren't limited to that which the OS provides. This also makes it possible to create custom components which is pretty much what the entire SWING API is. Also, your applications will look the same on every platform.
Does this help?


GenRocket - A Test Data Generation Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What does this mean?
 
Similar Threads
Behind Swings.
swing components
some java interview Questions
what is the meaning of Heavy weighted component and light weighted component.
what is peer ?