 |
Chronicles of the Trough: Sneak Preview
Posted by evanx on June 07, 2007 at 01:18 AM | Comments (4)
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.
Resources
You can browse the code for this exercise at
feedtray.dev.java.net.
See the classes FeedTrayApplication (and it's resource file),
FeedSystemTray, FeedManager, FeedReader.
FeedTray requires rome.dev.java.net
(which requires jdom.org),
and AppFramework.dev.java.net
(which requires swing-worker ie. org.jdesktop.SwingWorker).
Also see "New System Tray Functionality in Java SE 6,"
on the Sun Developer Network,
and "Displaying messages in the system tray,"
by Michael Nascimento Santos.
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
i just noticed that there is a proprietary product called FeedTray which looks to be a system tray feed reader. So i guess i should change the name of this project, D'oh! i should have searched first, so that was silly of me...
Posted by: evanx on June 07, 2007 at 01:02 PM
-
Wow, that's cool! One thing, when I click view the window frame is slightly too big - the blue title bar is outside of the desktop (WinXP, Java 6). Maybe you should call setExtendedState(JFrame.MAXIMISE_BOTH) on your JFrame? Very neat app! Keith
Posted by: commanderkeith on June 07, 2007 at 07:25 PM
-
hiya keith, i noticed that too. (I'm also WinXP, Java6). There seems to a problem with AppFramework session when using WebStart, which i haven't debugged yet - i started and then left off. Certainly i will try to fix it, and in the meantime, use your suggestion to maximise the window by default. Thanks for your positive comments. Feedback is what makes it worthwhile publishing :)
Posted by: evanx on June 08, 2007 at 03:12 AM
-
by the way, the future name and site for this project is "feedtrove" and http://feedtrove.dev.java.net, but svn will remain on feedtray.dev.java.net for a next week until feedtrove has been approved ie. is publically accessible.
Posted by: evanx on June 08, 2007 at 03:15 AM
|