public void setImage (Image image)

Sets the image for this TrayIcon. The previous tray icon image is discarded without calling the java.awt.Image.flush method — you will need to call it manually.

If the image represents an animated image, it will be animated automatically.

See the setImageAutoSize(boolean) property for details on the size of the displayed image.

Calling this method with the same image that is currently being used has no effect.

Parameters:
image    the non-null Image to be used

Exceptions:
NullPointerException    if image is null

See also:
getImage, Image, SystemTray.add(TrayIcon), TrayIcon.TrayIcon(Image, String)