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

Win32 only: Moving a dialog box does not generate WINDOW_MOVED events

    Details

    • Subcomponent:
    • Resolved In Build:
      1.1
    • CPU:
      unknown, x86
    • OS:
      windows_95, windows_nt
    • Verification:
      Not verified

      Description

      Win32 only: moving a dialog box does not generate WINDOW_MOVED events.

      Steps to reproduce
      Compile and run the attached code
      Press <Open Dialog>
      // note: you will need /usr/green2/sqe/kas-tests/AppletFrame.java

      import java.awt.*;
      import java.applet.*;

      public class DialogBug extends Applet
      {
         private final String OPEN_DIALOG = "Open Dialog";
         public DialogBug()
         {
            add( new Button(OPEN_DIALOG) );
         }

         public void init()
         {
            resize(400, 400);
         }

         public boolean action(Event evt, Object obj)
         {
            if( evt.target instanceof Button )
            {
               Container parentFrame = getParent();
               while( !( parentFrame instanceof Frame ) )
                  parentFrame = parentFrame.getParent();
               
               Dialog d = new MyDialog( (Frame) parentFrame, "Test Dialog", false);
               d.show();
               
               return true;
            }
            else
               return super.action(evt, obj);

        }

         public static void main(String argv[])
         {
            AppletFrame.startApplet("DialogBug", "Dialog bug", argv);
         }
      }

      class MyDialog extends Dialog
      {

         public MyDialog(Frame parent, String title, boolean modal)
         {
            super(parent, title, modal);
            resize(200, 200);
         }


         public boolean handleEvent(Event e)
         {
            switch(e.id)
            {
               case Event.WINDOW_DESTROY:
                  dispose();
                  return true;
                  
               case Event.WINDOW_ICONIFY :
                  System.out.println( "Window Iconify" );
                  break;
               case Event.WINDOW_DEICONIFY:
                  System.out.println("Window de-iconify");
                  break;
               case Event.WINDOW_EXPOSE:
                  System.out.println("Window Expose");
                  break;
               case Event.WINDOW_MOVED:
                  System.out.println("Window Moved");
                  break;
            }
            return super.handleEvent( e );

         }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tballsunw Tom Ball (Inactive)
                Reporter:
                kasmithsunw Kevin Smith (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: