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

Frame triggers componentMoved and componentResized events when restored from iconified state

XMLWordPrintable

    • b51
    • 6
    • x86
    • windows, windows_xp

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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: