-
Enhancement
-
Resolution: Fixed
-
P3
-
1.0, unknown, 1.1.8, 1.4.0_04, 1.4.2, 5.0, 6
-
b85
-
x86, sparc
-
linux, linux_redhat_7.2, solaris_2.5, solaris_2.5.1, windows_nt, windows_2000, windows_xp
When setting the icon for a window there are a couple of limitations:
1) You can't set multiple sizes. So, the same icon is used in the task bar (16x16) and when the user Alt-Tabs (32x32). As a developer, you have to make a choice as to which one of these will be ugly.
2) You can't set transparent icons. Using PNG with an alpha channel results in very ugly icons.
JUSTIFICATION :
In order for Java applications to truly co-exist on a platform, they have to look nice. The current implementation makes them appear unprofessional. As a result, we have to write native code to fix these problems.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
First, icons should support transparency.
Second, perhaps a new image format that can include multiple images of different sizes should be supported.
ACTUAL -
I am forced to create opaque icons. Then, I create a 16x16 for the task bar, but when the user presses Alt-Tab, a 32x32 icon is displayed, which is just scaled up from 16x16. If, instead, I use a 32x32 icon, the task bar icon looks terrible.
---------- BEGIN SOURCE ----------
JFrame frame = new JFrame().
frame.setIconImage(/* pass a transparent PNG */);
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Native code.
Additional problems being fixed:
- Dialog don't always inherit icon from parent frame on XAWT
- Ownerless dialogs always displays an unmodifiable "coffee cup" icon
(see description of 6317332 for details)
- duplicates
-
JDK-4633899 Frame.setIconImage() contradicts to getIconImage() in case of null arg
- Closed
-
JDK-4721400 Allow to specify 32x32 icon for JFrame (or Window)
- Closed
-
JDK-6317332 JDialog always displays an unmodifiable "coffee cup" icon
- Closed
-
JDK-4913618 Dialog doesn't inherits icon from its parent frame
- Closed
-
JDK-4088703 Need mechanism for displaying platform-sized miniaturized icons
- Closed
- relates to
-
JDK-6435804 REGRESSION: NetBeans 5.0 icon no longer shows up when you alt-tab on XP
- Resolved
-
JDK-6436437 JFrame.setIconImages() doesn't select optimal icon size when client-decorated
- Resolved
-
JDK-6443357 corrupted toplevel icon on scaled image
- Resolved
-
JDK-6425089 PIT. Frame does not show a big size jpg image as icon
- Closed
-
JDK-6425126 PIT File Dialog icon is not matching with the new java icon (frame Icon) - PIT build.
- Closed
-
JDK-6425606 PIT: Child dialog inherits the wrong icon from the parent frame if the parent is LAF decorated
- Closed
-
JDK-6425608 PIT: Changing the frame's icon after it is shown does not work on Solaris
- Closed
-
JDK-6425614 PIT: New icon is not refreshed properly on the title bar for LAF decorated JFrame - setIconImgs
- Closed
-
JDK-6415057 Icon of the child dialog is not updated on-the-fly when parent's icon changes, XToolkit
- Closed
-
JDK-6445278 JDialog.setIconImage(s)() doesn't properly set the alt-tab icon on WinXP
- Closed