Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6267936

PIT: Changing the image does not clear the previous image on Sol10-JDS, System Tray

XMLWordPrintable

    • b47
    • sparc
    • solaris_10
    • Verified

      I am creating a tray icon with a GIF image and adding it to the system tray. The image appears properly. I am changing this image to a new GIF image where the new image is transparent (background is seen through). When I call TrayIcon.setImage(), the new image is drawn on top of the old image and old image is actually not erased properly. Since the new image is a transparent image, old image is seen through. So the whole tray icon gets messed up. Removing and adding the icon again solves the problem.

      This is noticed only on Solaris10-JDS and not reproducible on Win32. On Win32, the background is cleared properly before drawing the new image. This is seen on the following PIT build:

      java version "1.6.0-awt.pit-int-awt-blade"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-awt.pit-int-awt-blade-df153228_06_May_2005_08_56-b00)
      Java HotSpot(TM) Client VM (build 1.6.0-ea-b35, mixed mode)

      I have attached a sample test and few images. Execute the sample test on Sol10-JDS as follows -
      "java SystemTrayTest".
       You would see a default image on the tray icon. You would see a frame. Click 'Set Image' button. A file dialog would appear. Select 'fight.gif' image (attached to the bug report). If fight.gif is drawn on top of the existing image, the bug is reproduced.
      ###@###.### 2005-05-10 14:09:54 GMT

      This is well noticed when using any of the transparent animated gifs. The background is not cleared when switching over from one frame to another frame in the animated image and hence all the frames are drawn one above the other (use animdog.gif).


      ###@###.### 2005-05-10 14:34:09 GMT

            art Artem Ananiev (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: