Java 2 Platform Standard Edition 6.0 version (Mustang) lets you access the system tray through two classes in the java.awt package: SystemTray and TrayIcon.
System Tray in <b>Java</b>
These classes give you the ability to add graphics, popup menus, and floating tip functionality to the system tray. If approved by the JSR 270 Expert Group you can expect to find this feature in the final version of Mustang. Approve it already!

The java.awt.SystemTray class represents the system tray for a desktop. You can access the system tray by calling the static SystemTray.getSystemTray() method. Before doing so, however, the application should always check if the system tray is supported using the static SystemTray.isSupported() method. If the system tray is not present or supported on this platform and the application attempts to call getSystemTray() in such a case, it will throw a java.lang.UnsupportedOperationException.

Read this article for more details.