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:
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
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.
Share your work with others by using this form: |