JDK-4737770 : RFE: Access to desktop notification area, i.e. Windows Systray
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2002-08-27
  • Updated: 2005-09-20
  • Resolved: 2005-09-20
Related Reports
Duplicate :  
Relates :  
Description
Name: jk109818			Date: 08/27/2002


FULL PRODUCT VERSION :
java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)

Applies to all operating systems with a desktop environment

A DESCRIPTION OF THE PROBLEM :
(It is possible this request would have been addressed
through JSR-143, had it not been rejected for being overly
broad.)

Typically, operating systems with desktop environments
provide a 'notification area' where long-lived applications
can run while occupying a small (non-zero) amount of
desktop space, but can notify the user of relevant events
(typically with a change of icon, sound clip, etc). The
user can also use the small notification icon to control
the application to some extent, though typically not with
the richness with which a full Frame would allow. This
request is for an API by which a Java application can
access such a notification area, if it exists on the host
environment. There should be at least one new class to
handle these capabilities, along with any new EventObject
and EventListener subclasses required to handle generated
events not already handled by the existing event classes.
The class should support:
-> Arbitrary icon in notification area; icon should support
rapid updates, as this will be a primary means by which the
user receives notification about the status of the
application.
-> Detection of mouse events. The typical behaviour for a
right click is to create a popup menu (or JPopupMenu), and
for left double click is to show a Frame (or JFrame); these
behaviours should be facilitated by the base class, or
provided by a convenience subclass, but full control over
what occurs one given events should be supported.

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER WORKAROUND :
Use JNI to access the platform's underlying API for the
notification area.

Create a small undecorated JFrame containing a notification
component. This frame could too easily be obscured by other
desktop elements in a way that the notifcation area cannot;
such a frame will also reside in the same space as other
active windows, instead of in an area reserved for
processes that do not need constant input.

There exist commercial libraries which support this
behaviour, but notification areas are sufficiently common
that they should be supported through AWT.
(Review ID: 163670) 
======================================================================

Comments
EVALUATION This feature has become a part of Mustang API. See 4310333 "API to add a java program to a system's app-launching panel/toolbar".
20-09-2005