A treat from SWT

Back in the day, we decided to switch from a Swing-based Java toolkit for tXtFL to a SWT-based one. SWT (pronounced "sweet") is an alternative graphical toolkit originally developed by IBM that provides native widgets so that the graphics are both lightweight and a seamless fit into the look-and-feel of the user's desktop.

So why SWT for tXtFL? At the time, we were focused on delivering Java-independent executable to the Windows platform for those users who didn't have Java installed, and SWT + GCJ (a GNU compiler for Java) was the perfect fit. Now that a good 90% of desktops have Java installed, the need to for such workarounds to Java has become less important, and the sweetness of SWT seems less appealing...at first glance at least.


SWT 3.6 milestone 5 was released this past weekend, and right away we could load it up to start using its new browser cache fix that all tXtFL downloaders can now enjoy.

Upon looking back at tXtFL development since the 1.0 release, what I've seen how much tXtFL has benefited from SWT. With upgrades in Swing, we would have to wait until we figured that a large number of folks have installed the latest Java version before we could expect people to see the new feature work on their tXtFL install. The beauty of SWT is that when a new feature comes out, we simply package a new version of the SWT library with tXtFL to take advantage of it. Since we don't want to require that people install the latest version of Java just to get our simulator to work, SWT is once again helping to make tXtFL less reliant on Java while still making use of the near ubiquity of Java and the powerful Java platform.

Another advantage of SWT is the number of widgets it supports out of the box. Granted, coding SWT graphics are a little more cumbersome at times than similar coding for Swing. But seeing a fully operational browser window integrated right into the tXtFL interface using SWT is truly worth the cost in development time.

We'll be looking forward to introducing new features from the latest releases of SWT into tXtFL!

Comments

Popular Posts