Java Abstract Window Toolkit (AWT)
System tray could be accessed by the Java. In Java, class java.awt.SystemTray presents the system tray, for desktop. The static method SystemTray.getSystemTray() calls the operating system’s System tray.
SystemTray.isSupported() is used for checking whether it provides support, before its access. It throws java.land.UnsupportedOperationException in case if it doesn’t support or is not checked for support. Just one SystemTray’s instance is present in Java application.SystemTray’s
At desktop’s bottom, a specific area named as “the system tray” exists. Operating system user always has the access to this area.
1. Referred as system tray in KDE.
2. In windows, it is also known as Taskbar Status area.
3. It is known as notification area in case of a Gnome desktop.
This area is accessed as well as shared all times in any operating system, by all applications.
The given figure illustrates the system tray at Linux as well as MS
Since Java SE 6, programmers can add an icon for their applications in the system tray area of the operating system. A common usage scenario of the system tray is having a popup menu showing when users right click on the icon. The popup menu presents to users with common tasks that the application provides. When users double click on the icon, they will access the default action of the program. The screenshot below depicts a tray icon and popup menu of an application in the Taskbar notification
Updated 12-09-2011 at 04:38 PM by Java AWT