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

JDialog must not show an icon on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 6u15
    • Fix Version/s: None
    • Component/s: client-libs
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      FULL PRODUCT VERSION :
      java version "1.6.0_15"
      Java(TM) SE Runtime Environment (build 1.6.0_15-b03)
      Java HotSpot(TM) Client VM (build 14.1-b02, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      JDialog.setIconImage(null) must not show an icon on Windows.

      Windows makes a clear difference between frames and dialogs. The typical Windows frame HAS an icon, while the typical Windows dialog has NO icon. Due to the WORA principle, it is up to the PLAF to decide about this behaviour, as it is not application- but OS-dependent. Currently a programmer must take care on his own and set the correct dialog title decoration, while obviously it should not be the application's task. Instead, an application should just set the icon, and rely on the PLAF to correctly view (or not view on Windows) the icon.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      new JDialog().setImageIcon(...)

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      On Windows, the dialog must not show the icon in the title bar.
      ACTUAL -
      On Windows, the dialog shows the icon in the title bar.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Break the WORA principle and set the dialog's decoration dependent on the current OS inside of the application.

        Attachments

          Activity

            People

            Assignee:
            anthony Anthony Petrov (Inactive)
            Reporter:
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Imported:
              Indexed: