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

Improve icon support

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 1.0, unknown, 1.1.8, 1.4.0_04, 1.4.2, 5.0, 6
    • client-libs
    • b85
    • x86, sparc
    • linux, linux_redhat_7.2, solaris_2.5, solaris_2.5.1, windows_nt, windows_2000, windows_xp

      A DESCRIPTION OF THE REQUEST :
      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)

            vbaranovsunw Vyacheslav Baranov (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: