<AWT Dev> COMPONENT_RESIZED/COMPONENT_MOVED events for toplevel windows

Anthony Petrov Anthony.Petrov at Sun.COM
Fri Apr 24 07:45:34 PDT 2009

There's a bug: 6754618 (Frame triggers componentMoved and 
componentResized events when restored from iconified state) [1]

Running the test on different platforms with different Java versions I 
observe different results:


1.5.0, 6u13:
Immediately after running the test I receive the Resized and Moved 
event. Subsequent iconification/deiconification of the frame does not 
generate any additional events.

7 (~b56):
I receive only the Resized event on startup. 
Iconification/deiconification do not generate any events. The Moved 
event gets never delivered.

MS Windows Vista:

I receive no events at all, neither on startup, nor on subsequent actions.

1.6.0, 6u14, 7 (~b56):
No events on startup. Each deiconification generates the Moved/Resized pair.

Because of the different behavior, I can not decide which one should be 
considered a correct one. In most cases the AWT sends the events to 
components when it receives the events from the native system. Some time 
ago we decided that this would be the most correct behavior that we 
could achieve. Indeed, the Moved/Resized pair observed currently on MS 
Windows get generated as a reaction on the natively received 
WM_SIZE/WM_MOVE messages (in JDK 7: see the 
src/windows/native/sun/windows/awt_Window.cpp file for details).

Does anyone have any ideas on what should be done with the bug?

[1] http://bugs.sun.com/view_bug.do?bug_id=6754618

best regards,

More information about the awt-dev mailing list