if (SystemTray.isSupported()) {
// get the SystemTray instance
SystemTray tray = SystemTray.getSystemTray();
// load an image
Image image = ((ImageIcon) IconFactory.getIconBig("report-80x80.png")).getImage();
trayIcon = new TrayIcon(image, "Time Reporting", new TrayPopupMenu());
try {
tray.add(trayIcon);
} catch (AWTException e) {
System.err.println(e);
}