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

Iconifying JInternal Frame removes peer which breaks JNI

    XMLWordPrintable

    Details

      Description

      FULL PRODUCT VERSION :
      jre 1.6 b105

      ADDITIONAL OS VERSION INFORMATION :
      When iconifying a JInternalFrame the DefaultDesktopManager class removes the JInternalFrame which causes the window handle associated with the frame to become invalid breaking any JNI client code.
      So if you have a canvas tied to a movie viewer it casues the movie to be unloaded.

      A DESCRIPTION OF THE PROBLEM :
      I am using a canvas that has a movie playing in it and the movied is tied to the cavas via a window handle to the drawing surface. The canvas is added to a JPanel which in turn is added to the JInternalFrame.
      When the JInternalFrame is inconified via selecting the minimize button the video code indicates gets a WM_DESTROY message and the window handle associated with the drawing surface for the canvas becomes invalid.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Actually, on the java.net developers forum there is an example suppiled by one of the Sun engineers. The link is:

      http://forums.java.net/jive/thread.jspa?threadID=25806&tstart=0

      Look at the code example Oleg supplied.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The movie to not to stop and unload and to be available when deiconifying the JInternalFrame.
      ACTUAL -
      I get a error from the movie code indicating the movie was unloaded

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Created an extends of the DefaultDesktopManager that hides the window instead of removing it when iconfying the window. Upon deinconifying it the window is resized to prior location and size.

        Attachments

          Activity

            People

            Assignee:
            mbronsonsunw Mike Bronson (Inactive)
            Reporter:
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Imported:
              Indexed: