JDK-5078459 : Inconsistent Popup window opening and parent/child relationship
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.2_05
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2004-07-26
  • Updated: 2004-07-30
  • Resolved: 2004-07-30
Related Reports
Duplicate :  
Description
This program first registeres itself as an AWTEventListener and starts
another Java program (e.g. SwingSet2 demo) passed as a command line
argument. It then displays message as new windows are opened/closed. It
also display the name of the menu item and it's ancestor window when
user clicks on a menu item.

The following procedure will help us notice this behaviour:

a) Compile and run this program with the standard
  "SwingSet2 demo as follows:

c:\>java -classpath ".;%JAVA_HOME%\demo\jfc\SwingSet2\swingSet2.jar"
    DumpWindow SwingSet2

b) Click on "Themes" (Do not select any of the selection just yet).

   You will see that the program print "Menu: JMenu" and "Window:
   JFrame".

c) Select any one of the themes, say Aqua.

   The program will print "Menu:JRadioButtonMenuItem" and "Window:
   JFrame".

d) Now select "File --> About" and click "OK"

e) Go back to Themes (again do not select any option, just click and
   hold the mouse on "Themes")

   The program will print "Menu: JMenu" and "Window: JFrame"

   **Interestingly** this time, we will see the following event:

********

java.awt.event.WindowEvent[WINDOW_OPENED,opposite=null,oldState=0,newState=0] on
 ###overrideRedirect###
   javax.swing.Popup$HeavyWeightWindow[###overrideRedirect###,213,104,117x152,la
yout=java.awt.BorderLayout,rootPaneCheckingEnabled=true]

******

which we did NOT see earlier at step b.

f) Now select any theme, say "Default", now, you will see the program
   will print "Menu: JRadioButtonMenuItem"  and "Window:
   Popup$HeavyWeightWindow"

*NOTE* At step f), the ancestor for "JRadioButtonMenuItem" has CHANGED
from "JFrame" in step c) to "Popup$HeavyWeightWindow" is step f).

---

Comments
EVALUATION ###@###.### or ###@###.###: ###@###.### told the submitter that this was fixed in Tiger. Can one of you please confirm this. And if it is the case, would you please have a look for the bug that fixed it so this can be closed as a duplicate? Thanks! ###@###.### 2004-07-26 This was already fixed as part of 4791569. ###@###.### 2004-07-30 ###@###.### 2004-07-30
26-07-2004