This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes Drag and drop and cut, copy, paste between awt / swing and swt. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Drag and drop and cut, copy, paste between awt / swing and swt." Watch "Drag and drop and cut, copy, paste between awt / swing and swt." New topic
Author

Drag and drop and cut, copy, paste between awt / swing and swt.

Greg Pirsig
Greenhorn

Joined: Apr 27, 2009
Posts: 1
Greetings all!

My Project Team and I are developing an Eclipse / SWT based application that also uses Swing components (like NASA's World Wind). I need to support cut, copy, paste and drag and drop of custom objects between awt / swing and swt. I have found many examples of crating custom Swing DataFlavors and custom SWT ByteArrayTransfer classes for custom types. I can get DND and CCP to work between Swing <-> Swing and between SWT <-> SWT, but I can not get DND or CCP between Swing <-> SWT. I'm not sure what I am doing wrong. I have tried creating many variations of DataFlavors using serialized java objects, mime times etc but they just don't seem to be compatible.

The key point here is that I am trying to create custom DND / CCP Swing DataFlavors and SWT Transfer types, rather than use the standard Text types.

I have spent much time on this and I have gotten nowhere. Any help would be greatly appreciated!



Thanks

Greg Pirsig.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Drag and drop and cut, copy, paste between awt / swing and swt.