MENU

Java Tasktray Icons Displayed and Blinking

TOC

Java.task tray(in Japanese history)system tray (e.g. in Microsoft Windows)) icons.Indication/Flashing

Java.task tray(in Japanese history)system tray (e.g. in Microsoft Windows)This section introduces utility classes that display and blink the icons of the

In the utility class, the new feature added in Java SE 6 Mustang is SystemTray , ,TrayIcon class. A sample application is also included to illustrate its use.

System tray (task tray) function

The system tray (task tray) is a small icon that lines the lower right corner of the computer screen. Java SE 6 adds the following classes to utilize the system tray functionality.

  • SystemTray
     The SystemTray class represents the desktop system tray.
  • TrayIcon
     The TrayIcon object represents a tray icon that can be added to the system tray.

How to create a blinking icon

To create a flashing icon, you may use the following site
Upload a local icon to create a flashing icon.
https://www.bannerkoubou.com/anime/

Sample Applications

TaskTray SystemTray java.awt.SystemTray java.awt.TrayIcon

The sample application uses the system tray utility class TaskTrayUtil to implement the following functions

  1. When activated.task trayindicates such things as location of person or thing, location of short-term action, etc.iconDisplay.
  2. Click the [Flashing Button],task trayicon blinks.
    Also, a balloon with the message "Get me out of here!!!!!!!!!!!!!!!!!!!!!!!!" message.
  3. Click [Release button] to cancel the icon blinking.
  4. task trayicon with a single left click to bring the main window out onto the desktop.
  5. task trayicon, right-click to display the default PopupMenu menu.
  6. Once the main window is minimizedtask trayStored in

Source code acquisition


The source code can be obtained from When compiling, please also save the following icons in the same location as the source coded.

  • Normal icon 
  • Flashing Icons 

TOC