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

Transparent JDialog will lose transparency upon iconify/deiconify sequence.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u25, 8-pool, 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b107
    • CPU:
      x86_64
    • OS:
      windows_7

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_25"
      Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
      Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      Creating an undercoated and transparent JDialog with a JFrame as its parent will lose transparency upon a JFrame iconify/deiconify sequence.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) Run the test case ( JDialog will display with transparency )
      2) Minimize the JFrame
      3) Restore the JFrame ( JDialog will be 100% opaque )



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The expectation is the JDialog will retain opacity setting.
      ACTUAL -
      All opacity is lost and the JDialog is 100% opaque.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      No error message

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      final JFrame f = new JFrame();
      f.setSize(250, 250);

      final JDialog d = new JDialog(f, false);
      d.setSize(250, 250);
      d.setUndecorated(true);
      d.setOpacity(.75f);

      f.setLocationRelativeTo(null);
      d.setLocation(f.getLocation().x + 260, f.getLocation().y);

      f.setVisible(true);
      d.setVisible(true);
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Various work-a-rounds involve adding a window listener and manipulating visibility and/or opacity and or BG colors but does not always work for all application scenarios. One work-a-round it to simply toggle visibility upon deiconify but that alone does not work for all scenarios.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pkbalakr Prem Balakrishnan (Inactive)
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: