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

XToolkit: calling toFront() on Frame generates unexpected COMPONENT_RESIZED even

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1
    • 5.0
    • 5.0
    • client-libs
    • b30
    • x86
    • linux

    Description



      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 ====================
      ======================================================================

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: