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

Transparent JDialog will lose transparency upon iconify/deiconify sequence.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 8u25, 8-pool, 9
    • client-libs
    • b107
    • x86_64
    • windows_7

      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.

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

              Created:
              Updated:
              Resolved: