Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

drag and drop cursor

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm writing an app that allows me to drag a blue square (JPanel) on a canvas (another JPanel) and drop it at another location on the canvas. The dnd works, but I would like to know if there is a way to change the dnd cursor to a hand during the drag and return to the normal cursor when the drop occurs.
Thanks in advance..
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its weird ...i need extensive help with draging and dropping (i dont know anything about it) so if you know of any good online guides (ive seen a few but they focus on transfering objects ...i just wanna move polygons around!)

anyway while playin arounjd with this dnd business i wanted to change to a hand also and found to do this is simple! replace

(or which ever you used) in


so you get

-somethin like that

there are of coarse several cursors (you can make your own if you like) but you can see em all at (goto java.awt then the Cursor class) *note thats 1.5 so it might not work with earlier versions!

-Jerome BG
Quick! Before anybody notices! Cover it up with this tiny ad:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic