>I was wondering to what extent Swing depends on the native AWT Toolkit in
>the JVM.  In (simplistic) theory the toolkit primarily needs to be able to
>supply a particular platform's implementation of a frame, and a drawing
>surface. In other words, the only heavyweight peers involved are for frames
>and images. Is this the case the way Swing is currently implemented? Is
>there any difference between 1.1 and 1.2 in this respect?
>

This is pretty much correct. The Idea is that AWT only supplies the minimum 
needed from the OS, and Swing then draws the actual components. This is why 
you can have the same look and feel on two different platforms, because the 
underlying OS does not draw the components.

If you have a look at the API docs that come with the JDK, or the swing 
download ( if you are using 1.1 ) you can see what I mean. If you look at 
say JButton;

java.lang.Object
  |
  +--java.awt.Container
      |
      +--javax.swing.JComponent
            |
            +--javax.swing.AbstractButton
                  |
                  +--javax.swing.JButton

And then the AWT button.( which is a Native Peer )

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Button

Regards

--Jools


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to