I have created a sample java application for using tray icon.
trayIcon.displayMessage("Sun TrayIcon Demo", ...