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

Frame triggers componentMoved and componentResized events when restored from iconified state

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Build:
      b51
    • Introduced In Version:
      6
    • CPU:
      x86
    • OS:
      windows, windows_xp

      Description

      Frame triggers componentMoved and componentResized events when it is restored from iconified state. This is reproducible on Windows platforms starting jdk6. This is not reproducible with jdk5.

      To reproduce, run the below code. It shows a Frame in iconified state. Restore it and see for 'Resized', 'Moved' messages in command window.

      import java.awt.*;
      import java.awt.event.*;

      public class FrameEventTest {
          public static void main(String[] args) {
              Frame f = new Frame();
              f.setExtendedState(Frame.ICONIFIED);
              f.setSize(200, 200);
              f.addComponentListener(new ComponentAdapter() {
                  public void componentMoved(ComponentEvent event) {
                      System.out.println("Moved");
                  }
                  public void componentResized(ComponentEvent event) {
                      System.out.println("Resized");
                  }
              });
              f.setVisible(true);
          }
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              anthony Anthony Petrov (Inactive)
              Reporter:
              gramachasunw Girish Ramachandran (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: