Skip navigation.

Java and GTK+ integration

Sun Microsystems
Sun Microsystems

After I mentioned the planed Java GTK+ integration in the last GNOME Summary people have been asking me for more details on the Java GTK+ themeing. So I decided to contact Sun's Scott Violet who is the technical lead for Swing, and who are part of the group that architected and implemented Swing's GTK+ look and feel. HE was kind enough to answer some questions, so here is my small Java and GTK+ interview to satisfy the curios among you :)
So read the interview below.
ChristianJava 1.4.2 will feature support for GTK+ themes, do this include all theme engines or just a subset?

Scott: Only a subset. The GTK+ look is emulated, so there is a need to port engines over. 1.4.2 will include pixmap, bluecurve and the default.

So how will user get their Java apps to look like their GTK+ apps?

Scott: Just as any other swing look and feel, you can do:
UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndfeel");
And your Swing app will look like a GTK+ app.


Since only a subset of the theme engines will be available, will it be possible for theme engine developers to do create their own java theme engines to match their GTK+ engine?

Scott: We really scrambled to get a GTK+ look in 1.4.2, as such we didn't have time to open up as much of the API as we would have liked. In other words creating your own theme engine in 1.4.2 won't be possible. In 1.5 we will open up the API to allow creating your own theme engine, just as you can in GTK+. The API will be very similar to that of GTK+, so that it will be trivial for a GTK+ theme engine developer to write the equivalent Swing GTK+ theme engine.

Any other GTK+ and GNOME integration features?

Scott: For internal frames we provided support for mapping the look to metacity themes. In 1.4.2 we hardcoded crux and bluecurve, but in 1.5 we will support parsing metacity theme files so that we should be able to emulate any metacity theme.


When can we expect Java 1.4.2 to be available?

Scott: A beta should be out really soon!

Screenshots

Scott where kind enough to provide us with some screenshots showing the GTK+ style themes in action.

Re: Java and GTK+ integration

someone correct me if I'm wrong .. isn't there some JNI thing that eclipse uses that binds to the native toolkit .. gtk included?