Java System Tray  

   The system tray concept might be more familiar to Windows users only, so putting together Java and System Tray may sound a little weird first. But what is this System Tray? Is that "piece of screen" near the system clock on toolbar where a lot of icons are gathered showing some applications that mainly run in background. Java has no support for this - and why? because is system dependent and only a few other OS have support for something similar. But a user used with Windows applications expects form a Java application that runs on his system to have a known behavior (and the "known behavior" might include a way of interacting with background application through system tray icon). So having a tool that manages the system tray in Java can help an application that also wants to satisfy its users.

   All this being said let's talk a little about this piece of software I developed. The package used to provide such a support (for System Tray Icon) is in fact a wrapper for the native code (C++) used to build a dll, which will be imported in our applications. So JNI is used to develop this so-called tool. To build the dll file I used a similar project ( Desktop Indicator) and I added the support for the popup that shows when (usually) right-click the icon and some other small stuff. Here is a sample popup-window that shows when right-click on systray icon.

You can download:
 - The VC6 project and the source code for the dll [Here]
 - The Java package [Here]
 - and of course the API documentation [Here]

 You can start developing your application using the Java System Tray Manager by adding the dll file in a folder so the JVM can find it (for example in WINDIR/system32/ or in the root of your project) and by importing the jar containing the library. Enjoy!

 

 

This is version 1.01
 - has been tested with jdk1.3 and jdk1.4.1 only on win2K & with jdk1.3 on winNT Server 4 service pack 6a (thanks to Gabriele Mariotti)

For the next version I would like to add some new features:
 - add suport for Windows popup (for specific Windows features)
 - balloon and multiline tool tip support
 - support for Linux KDE task bar

The software is free under the GNU General Public License

Need any kind of help or have any suggestion contact me! I'll appreciate any comments in case you use the soft.



Here you can find a list of projects that use systray library (as an example for you, and/or for your own usage). The following projects are provided by programers (like your self) that needed this library to complite their projects. You can also share your project with others by using the form.


Project name Description See more
Scheduler A Java Application for managing To-do lists for multiple people in a department. Allows assigning of events to a user, then tracking the status of that event. Data is stored in a mysql database for persistence and stability. Also has a contact management feature. Future plans are to make this part of the database more integrated, more generic, and easier to setup. In addition, See http://gandalf.mercersburg.net/walt/scheduler/todo.txt for a list of planned of bugs-fixes/additions...  here



Share your work with others by using this form:
Project name:
Project creator:
Contact:
Project's web address:
Project source:
Description:



Number of visits on this page: 31700
Last update: 03/03/2003