JDK-8173127 : Activating a JDialog puts to back another dialog
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8u121
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: os_x
  • CPU: x86
  • Submitted: 2017-01-20
  • Updated: 2018-02-02
  • Resolved: 2017-01-20
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Mac OS X 10.7.5
mac OS 10.12.1

A DESCRIPTION OF THE PROBLEM :
This bug appears fixed in Java version 1.8.0_121 release notes (bug id 8169589), but it is still unresolved.

If a Swing application opens two dialogs, activating one dialog puts the other one behind the app frame.

The attached test case also reproduces the problem using 'java.awt', i.e., replacing JFrame by Frame and JDialog by Dialog.

REGRESSION.  Last worked in version 8u111

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Executing the attached test case.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Activating each of two dialogs, both dialogs must remain above the app frame.
ACTUAL -
Activating one dialog puts the other one behind the app frame.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javax.swing.*;

public class Test
{
    public static void main(String args[])
    {
        JFrame frame = new JFrame("FRAME");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setBounds(200, 50, 300, 300);
        frame.setVisible(true);

        JDialog dlg = new JDialog(frame, "DLG 1", false);
        dlg.setBounds(50, 100, 200, 200);
        dlg.setVisible(true);

        JDialog dlg2 = new JDialog(frame, "DLG 2", false);
        dlg2.setBounds(450, 100, 200, 200);
        dlg2.setVisible(true);
    }
}
---------- END SOURCE ----------


Comments
JDK-8169589 is not fixed in 8u121 GA release - 8u121 b13. JDK-8169589 fixed only in BPR builds http://www.oracle.com/technetwork/java/javaseproducts/documentation/8u121-revision-builds-relnotes-3450732.html
20-01-2017