Paul Duran writes:
> Hi all,
>
> I'm sure that this question has been asked several times before but I'm
> wondering if anybody has looked at using Gtk for the peer components in the
> AWT. Java allows for the peers to be defined by the implementation, and so I
> think it would be really nice (and even a bit unique) if there was an
> implementation of the AWT in GTK. There seems to be no reason to stay tied
> to motif (which is 1: not free 2: bulky and 3: must be used as statically
> linked for those of us who dont have motif installed on our system).
>
> With the current linux trend steering towards Gnome/GTK , it would be really
> fantastic for there to be an AWT implementation in GTK. Some ppl mentioned
> earlier about implementing GTL l&f in swing, but this would remove that
> necessity and also provide a very significant speed increase.
>
> In short, the source code availablility of GTK and the non-restriciveness of
> the peering interface in the JDK should allow us to port the AWT to use GTK
> for its peering widgets with a fair degree of ease.
Plus, the resulting implementation should be usable directly with the free Java
implementations, Kaffe and Japhar, giving them a fully compatible, open source
UI mechanism.
There is no technical reason why this work could not be done -- it's mostly a
matter of creating the proper native methods to interface GTK with Java, and
writing the appropriate Java Toolkit object and peer implementations. You may
end up having to implement the AWT drawing primitives as part of this effort,
but most of those are pretty straightforward. Ideally, though, it would be
best as an interim stepping stone to see if we can glue GTK to the existing AWT
drawing primitives so that the effort to achieve the first milestone doesn't
have to be quite so large. I'd also suggest looking at BISS-AWT -- I think
it's not API compatible, but there may be bits of code that can be used for
your effort.
I think it would be an amazingly cool and good thing to have a GTK based AWT.
Steve