Drag and Drop, but not really.

D

Daniel Pitts

I have a card game. There is a CardView component (extends
JComponent), and a TableTopView component (extends JPanel), and a
HandView component (extends JLayeredPane). The HandView contains many
CardViews. I'd like to allow the user to drag a CardView from the
HandView onto the TableTopView.

Is the Drag and drop support in swing what I want to use? If so, the
DnD tutorial hasn't been to helpful to me, and suggestions where I
should *start*? If it isn't DnD I should use, does anyone have a
suggestion? I have a glass pane that can be used to draw the cards as
I drag them, if I have to all the heavy lifting myself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top