• Post Reply Bookmark Topic Watch Topic
  • New Topic

Drag 'n Drop in Java  RSS feed

 
Catriona McCann
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I would like to enable users to drag a button and from one panel to another in my java application. I can drag the TEXT of the button label and drop it onto another button, but I would like to be able to actually drag the whole button (not just the text from it).
(Not only buttons but any components ...)
any ideas ??
Thanks
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's simply a coding issue. Capture the drag event and provide an appropriate icon for the drag. When they let go, remove the button from the original panel and add it to the new panel.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!