Jack McKalling Posted June 24, 2009 Share Posted June 24, 2009 Does anybody happen to know why transparent icons do not appear transparent at all, in the titel bar of a Java1.6 Window that is using the default Java Look and Feel?My application uses the java L&F for all its windows and dialogs, and thus has no windows look nor feel at all. Which is intended for no important reason. The icon that is displayed in the top left corner of the window and in the taskbar when minimized, are set by JFrame.setIconImages(). I have used two png files both with transparency for this method: one 16x16 and one 32x32. The 32x32 is working perfectly fine in the application itself and when the OS shows it on ALT+TAB, but the 16x16 image has no transparency anywhere used. Or so it appears.When magnifying a screenshot, it is clearly seen that the whitish edges around the icon are actually in the color of the inactive-titlebar. See these screenshots (and do a colortest if you don't believe):For days now I have been searching on the net what is causing these edges, or why the inactive color is used as the background at anytime. There has been a bug in java 1.5 concerning window icons, and it should have been fixed according to the bugfixes at Sun (no reference here), but still it is not working properly.Anybody knows anything about this? Link to comment Share on other sites More sharing options...
Jack McKalling Posted June 27, 2010 Author Share Posted June 27, 2010 One year later, I still haven't figured it out.. Though I now understand the actual background of the window icon is really the inactive window color itself, as if the active color is always rendered over the inactive color, but they forgot to do that for the space of the window icon.Probably no one has solved this issue yet, have you? Link to comment Share on other sites More sharing options...
wirehopper Posted June 27, 2010 Share Posted June 27, 2010 I cropped the image with GIMP, used the magic wand tool to select the white background, and clicked 'Cut', then saved the image as a .PNG. I think this will display properly. Link to comment Share on other sites More sharing options...
Jack McKalling Posted June 27, 2010 Author Share Posted June 27, 2010 This is not what I mean. I manage the image myself, I can make the background transparent at will, but it is Java that does not display the correct background underneath my image, that causes my unhappiness... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.