The "widget" part is a System Tray Icon... this is available through
JDIC (
Java Desktop Integration Components) by SwingLabs (Open Source). It's also been added to Swing in JSE 6.
The "notification" part can be done pretty much any way that you want. I think that Gmail notifier (and lots of other similar things like that) use
RSS, but you can use sockets, RMI, HTTP polling... just make sure you know the drawbacks and advantages to all of these approches...