Chronicles of the Trough: Sneak Preview
Here is a sneak preview of a trivial feed reader app using the Java6 SystemTray. It checks a few preconfigured (Java) feeds every 10 minutes, popping up a message when a new article is spotted.
(FeedTray, 1M/250k, unsandboxed, Java6)
The feedtray app itself is small (18k using pack200), but depends on ROME and AppFramework and their dependencies ie. jDOM and SwingWorker, so the total packed size is around 250k, and unpacked, well... much more!
Note that when you minimise or close the window, the frame is disposed, but the app still runs in the SystemTray. You have to right-click on the TrayIcon and choose "Exit" to exit the app and dispose its JVM instance.
You can browse the code for this exercise at
feedtray.dev.java.net.
FeedTray requires rome.dev.java.net
(which requires jdom.org),
Also see "New System Tray Functionality in Java SE 6,"
on the Sun Developer Network,
Resources
See the classes FeedTrayApplication (and it's resource file),
FeedSystemTray, FeedManager, FeedReader.
and AppFramework.dev.java.net
(which requires swing-worker ie. org.jdesktop.SwingWorker).
and "Displaying messages in the system tray,"
by Michael Nascimento Santos.





