View RSS Feed

Java AWT

System Tray Helpful Features

Rate this Entry
by , 03-04-2012 at 10:40 AM (427 Views)
  • Method setImage() is used to show the changed status of an application in your program. Its syntax is as following: trayIcon.setImage(updatedImage);
  • Tooltip can be obtained or set for Traylcon. When mouse is at Traylcon, it will be shown. For an operating system, it gets displayed that is dependent at the time period.
  • trayIcon.setTooltip("I'm busy. Go away.");
  • For Traylcon, auto size property is present. Image is fitted as well as auto sized by it. By default, itís set to false. In case the image is not been able to get fit to Tray or has been set to false, image will be full sized painted. This property could be set by using this code:
  • trayIcon.setImageAutoSize(true);
  • Any change in the status of an application is notified to user by the help of a tooltip. Such action is performed by using this code:

Java Code:
trayIcon.displayMessage("Finished downloading", "Your Java application has finished downloading",        TrayIcon.MessageType.INFO);

Submit "System Tray Helpful Features" to Facebook Submit "System Tray Helpful Features" to Digg Submit "System Tray Helpful Features" to del.icio.us Submit "System Tray Helpful Features" to StumbleUpon Submit "System Tray Helpful Features" to Google

Categories
Tray , Java AWT

Comments