Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4244067
Votes 25
Synopsis Wrong Transparent Color Replacement for Window Icons
Category java:classes_awt
Reported Against 1.2.2
Release Fixed
State 11-Closed, duplicate of 4175560, bug
Priority: 4-Low
Related Bugs 4175560
Submit Date 04-JUN-1999
Description




When you set a frame's window icon to a GIF that has 
a transparent background on Windows NT 4.0 SP4, the 
transparent portion of the image is set to black rather
than the color that the window's title bar is.

This problem has cropped up with all versions of JDK 1.2, 
however, I have not noticed this problem at all in 
the JDK 1.1.x platform.

This problem occurs with both 32x32 and 16x16 GIFs.

Below is a TestCase you can try.
Make sure that the image cloud-icon.gif is in the
same directory that you are running this code from.
I have posted the cloud-icon.gif file to my Web site
at http://www.dippybird.com/cloud-icon.gif


import java.awt.*;
import javax.swing.*;
public class TestFrame extends Frame {


  public TestFrame() {
    ImageIcon imageIcon;
    Image image;
    try{
      imageIcon = new ImageIcon(getClass().getResource("cloud-icon.gif"));
      image = imageIcon.getImage();
      this.setIconImage(image);
    }catch (Exception e){
      System.out.println("Problem finding cloud icon");
    }
    this.add(new Label("Notice that the transparent background "+
                        "color for this window's icon is black rather than the title bar color."));
    this.pack();
  }

  public static void main(String[] args) {
    new TestFrame().show();
  }
}
(Review ID: 83951) 
======================================================================
Work Around




None
======================================================================
Evaluation
Verified to exist in 1.2.2 and 1.3, Windows only.
Problem does not exist in 1.1.8.

  xxxxx@xxxxx   1999-08-04



This is a duplicate of  4175560 (setIconImage no longer handles transparent GIFs) which was fixed in 1.3.
  xxxxx@xxxxx   2004-04-09
======================================================================
Comments
  
  Include a link with my name & email   

Submitted On 09-JUL-1999
quoc_truong
I also have the same problem under Windows 95.


Submitted On 05-AUG-1999
DumaisP
Someone fix this please!
This seams like one of the last issues concerning a Java Application being
easily identifiable from a native Win32 application.


Submitted On 03-DEC-1999
ccronemberger
It would also be a good idea to have an icon with multiple sizes,
because when the icon is shown in the title bar it is 16x16 
and when it appears in the ALT-TAB window it is 32x32.


Submitted On 13-APR-2000
barilov
I reported this problem in 1998 (#4175560) and was informed 
that it is fixed. It does not look like that. 


Submitted On 21-OCT-2000
vasseura
Essentially the same problem, except that the whole image 
is black on NT4 SP5



PLEASE NOTE: JDK6 is formerly known as Project Mustang