1 Reply Latest reply: Aug 8, 2011 6:10 AM by 793415 RSS

    Mouse Drag is not working in Applets

    880925
      In our application we are using applets in containing in IFRAMES in IE to display different type of graphs and animations etc. User can open/close these Applets and iframes to navigate from one data view to other. During this navigation sometimes mouse drag event stops and all drag related operations like scrolls etc stops responding to drag operations in all applets in same JVM.
      My investigation shows that swing component hierarchy gets corrupted somehow and this exception is thrown

      EventMulticaster.eventDispatched(Toolkit.java:2244)
           at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2203)
           at java.awt.Component.dispatchEventImpl(Component.java:4528)
           at java.awt.Container.dispatchEventImpl(Container.java:2099)
           at java.awt.Component.dispatchEvent(Component.java:4460)
           at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4603)
           at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4255)
           at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
           at java.awt.Container.dispatchEventImpl(Container.java:2085)
           at java.awt.Component.dispatchEvent(Component.java:4460)
           at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
           at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
           at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
           at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
           at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
           at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
           at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


      peerComponents in Container class is returning null on call to getLocationOnScreen that causes this exception.

      I fixed the issue in awt library but ORACLE license terms don't allow redistribution of modified version of awt.

      Please help me fix this issue in applet code or suggest me to bypass license restrictions.

      Thanks in advance!

      Luqman
        • 1. Re: Mouse Drag is not working in Applets
          793415
          877922 wrote:
          ..
          peerComponents in Container class is returning null on call to getLocationOnScreen that causes this exception.

          I fixed the issue in awt library but ORACLE license terms don't allow redistribution of modified version of awt.
          Something Oracle do allow is to raise a bug report. On that report they invite you to post a work-around or fix. That would be the place to put the fix you have devised. Oracle will (supposedly) fix it, then you (and everyone else) can enjoy the fix as a free upgrade in the next version.

          They also offer 'support contracts' (AFAIU) in which you might pursue your own immediate fixes. But raise the bug report anyway.