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

XToolkit: toFront() causes COMPONENT_MOVED redundant event

XMLWordPrintable

    • b43
    • x86
    • linux

      Name: atR10251 Date: 01/29/2004


      Calling <toFront> on a Frame causes COMPONENT_MOVED to be generated for the Frame.
      It takes place on XToolkit.

      Here'is the testcase to reproduce the bug:

      ------------------------------------------
      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");
              final Frame f2 = new Frame("F-1");

              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();
          }
      }
      ------------------------------------------

      ======================================================================

            ant Anton Tarasov (Inactive)
            ant Anton Tarasov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: