JDK-4174928 : DnD between Swing Components broken for JDK 1.2 FCS build 'K' on Solaris
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.2.0
  • Priority: P1
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1
  • CPU: generic
  • Submitted: 1998-09-18
  • Updated: 1998-09-21
  • Resolved: 1998-09-21
Related Reports
Duplicate :  
Relates :  
Description
Hi
  Set Up : Solaris 2.5.1 , JDK 1.2 FCS build 'K'
  When trying DnD between Swing components i am getting  the following 
exception . This happens immediately after i initiate the drag operation. 
  In 'J' build it was working properly.Even in 'K' build DnD between Swing components works well on WIndows-Nt and Windows-95
   
 ( mouse Pressed
 starting drag )
        Exception occurred during event dispatching:
java.awt.dnd.InvalidDnDOperationException: The operation requested cannot be 
performed by the DnD system since it is not in the appropriate state
        at sun.awt.motif.MDragSourceContextPeer.startDrag(Compiled Code)
        at java.awt.dnd.DragSource.startDrag(Compiled Code)
        at java.awt.dnd.DragSource.startDrag(Compiled Code)
        at java.awt.dnd.DragGestureEvent.startDrag(Compiled Code)
        at MyDragButton.dragGestureRecognized(Compiled Code)
        at java.awt.dnd.DragGestureRecognizer.fireDragGestureRecognized(Compiled 
Code)
        at MyMouseDragGestureRecognizer.mousePressed(Compiled Code)
        at java.awt.AWTEventMulticaster.mousePressed(Compiled Code)
        at java.awt.Component.processMouseEvent(Compiled Code)
        at java.awt.Component.processEvent(Compiled Code)
        at java.awt.Container.processEvent(Compiled Code)
        at java.awt.Component.dispatchEventImpl(Compiled Code)
        at java.awt.Container.dispatchEventImpl(Compiled Code)
        at java.awt.Component.dispatchEvent(Compiled Code)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Compiled Code)
        at java.awt.LightweightDispatcher.processMouseEvent(Compiled Code)
        at java.awt.LightweightDispatcher.dispatchEvent(Compiled Code)
        at java.awt.Container.dispatchEventImpl(Compiled Code)
        at java.awt.Window.dispatchEventImpl(Compiled Code)
        at java.awt.Component.dispatchEvent(Compiled Code)
        at java.awt.EventQueue.dispatchEvent(Compiled Code)
        at java.awt.EventDispatchThread.run(Compiled Code)
      

 I am attaching SwingButtons.java for demonstrating this problem.

Thanks
-Ramesh
  

Comments
EVALUATION I am re-assigning this bug to classes_awt since it is *another* example of the Motif version of AWT discarding the X Event, associated with, and the cause of, the AWTEvent being used to initiate the DnD operation. The exception included in the bug is caused by the fact that the MouseEvent containing the initial press of the Drag initiating gesture no longer contains a valid XEvent with which to pass to Motif in order to initiate the drag. larry.cable@Eng 1998-09-21
21-09-1998