JDIC
By Adrian Sutton
Java Desktop Integration Components (JDIC) is a set of components aimed at making OS specific functionality available to Java programs and to allow Java programs to make better use of existing code within the OS.
The tray icon integration is an excellent example of this. It’s quite common for a Windows application to make functionality available via a system tray icon and now via JDIC Java apps can do just that. During some down time after our last release I had a chance to play with this while developing an internal time tracking application and it worked out really well. The system tray icon acts as the main UI for the program so it’s neatly tucked out of the way so it doesn’t waste screen space but always quickly available so recording time spent on a task is highly efficient. The downside is that it doesn’t seem to map to an OS X dock icon menu yet (the API doesn’t really fit that model particularly well anyway but it could be done).
The other interesting project for me in JDIC is the browser integration. There are a lot of complaints about the current HTML support in the Swing Text package so a simple solution for rendering HTML is to provide a Java interface to integrate the user’s default browser instead of attempting to write a pure-Java solution. Naturally this platform dependency restricts the number of systems that the program can run on but that’s probably not a bad tradeoff. Sadly, again this component isn’t working on Mac at the moment. The other massive limitation of this approach is that it doesn’t support HTML editing at all. The current Swing Text code may not be the world’s best editor (though you can build the world’s best editor using them <grin>) but at least they provide some editing support.
It’s particularly sad to see that Mac support isn’t being worked on early in the process and that Sun (who is throwing the majority of resources behind the project) isn’t putting some time into Mac ports instead of expecting the community to do that. The projects have a lot of potential but if they’re not available on the major OSs which Java is deployed to (Windows, Linux, Solaris and Mac) it makes them far less usable. It’s great that it’s possible for Mac developers to add support themselves since the code is opensource, but that doesn’t help much when the target audience for the library are Java developers but the developers have to be native programmers (Obj-C or C on OS X, C pretty much everywhere else).
It will definitely be interesting to see how this project progresses.