Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

adding drag functionality  RSS feed

 
b ta
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i'd like to add a dragging function to my custom widget so that i can drag it around my application. can someone please help me how to implement this? thanks.
 
Stuart Gray
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to use the java.awt.dnd package, particularly the interfaces DropTargetListener and DropSourceListener.
 
b ta
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh sorry i forgot to mention i'm using SWT. could someone provide a link to some sample code? thanks again.
 
Raja Kannappan
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this link:

http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html

- Raja.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!