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 ]
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?