Name: atR10251 Date: 10/23/2003
Unexpected COMPONENT_RESIZED event is generated when toFront() is
called.
This occures on XAWT only.
Run the test below to reproduce the problem.
=============== TEST CASE ==================
import java.awt.*;
import java.awt.event.*;
public class ToFrontTest {
public static void main(String[] args)
throws Exception
{
final Frame f1 = new Frame("F-0"), f2 = new Frame("F-1");
f1.setSize(200, 100);
f2.setSize(200, 100);
f2.setLocation(f1.getX() + 210, f1.getY());
f1.setVisible(true);
f2.setVisible(true);
Thread.sleep(1000);
Toolkit.getDefaultToolkit().addAWTEventListener(new
AWTEventListener() {
public void eventDispatched(AWTEvent e) {
if (e.getSource() == f1) {
System.err.println(e);
}
}
}, ComponentEvent.COMPONENT_EVENT_MASK);
f1.toFront();
}
}
================= END ====================
======================================================================