Interrupted IO and AWT

Per Bothner
Mon Mar 20 10:30:00 GMT 2000

Tom Tromey <> writes:

> My goal is to have a retargetable AWT -- one where we can plug in
> different back ends.  So we might have a Gtk+ back end (the one I'd
> like to see :-), a Windows back end, and even a back end running on a
> framebuffer (for embedded folks).  I don't know enough about AWT to
> say whether this is a realistic plan.

It is quite realistic - that is what the "peer" architecture
was meant to support.  However, Swing uses a different approach:
The actual widgets are written in "pure Java", using the operations
defined in java.awt.Graphics.

The two approaches have different trade-offs:
- Native peers can probably be implemented faster than a Swing-like
- Native peers may have better compatibility (both look-and-feel and
programming-wise) than pure Java widgets.
- Pure Java widgets as in Swing may make the system more coherent
and give better control.  It is probably is easier to get full
compatibility with Sun for the Swing widgets.
- Pure Java widgets allow compatibility with Swing's "pluggable-
look-and-feel" (PLAF).  However, I'm not sure that is important.
I would rather have PLAF built using (say) gtk's theability.

I suspect we may end up doing a little of both.
	--Per Bothner

More information about the Java mailing list