• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

InvalidDnDOperationException: Drag and drop in progress

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have an applet there I use drag and drop to a grid in a Jpanel. The objects I DnD is for example a JLabel, JButton!

This run without any problem on Win2000 and Internet Explorer! But if I run the same on WinXP I'll get java.awt.dnd.InvalidDnDOperationException: Drag and drop in progress!
I'm using jre1.4. Have tried with later version but had problems with the DnD to function.

Does anyone have a clue to what is the problem?

best regards, Emil Karlsson
[ November 05, 2005: Message edited by: Emil Karlsson ]
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey!

I had a problem with these InvalidDnDExceptions too. Not in an applet, but in an application on Win32. I didn't find neither the reason why nor the excact action producing that action. It just sometimes happened. Afterwards, DnD stopped working.
My ugly workaround is to put a try-catch-block around the startDrag-call.
Now, it seems to work fine. Might work for you...
 
k Oensen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Uhmm... and make sure, that you didn't use setDragEnabled(true);
Probably this causes a double-drag.
 
Emil Karlsson
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, thanks a lot
I'll try the try/catch thing.
The setDragEnabled(true) have read about in some other forums and have checked for.

I also found today that in some cases it can be a good idea to not mix the DnD from AWT and Swing. I've not tried it yet, so I don't know if it is that cause my problem!

Thanks again

Emil Karlsson
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by k Oensen:
Uhmm... and make sure, that you didn't use setDragEnabled(true);
Probably this causes a double-drag.



This is the right solution, thanks
 
Your mother was a hamster and your father was a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic