please help me , how can I drag my last card images witch is draw on applet.
I have draw 83 images one by one on applet , now I want to drag the only last images in the bunch of card, I am dragging all images one by one and drop it, but I want to only drag one card images witch is on top, please help me ASAP.
I haven't read through all of those, so this might be a repeat,
simplest way might be to load your images into JLabels, add
mouse and motion listeners to the labels, add the labels on
top of each other, then drag the top one.
When I started my game I was unaware of this class, and when I discovered it it made things so much easier. It's an extremely powerful control with an API that is surprisingly intuitive.
I forget if the demo in that uses true drag and drop or handling mouse events for moving the little Duke guy around, but in mine I used the mouse listeners like Michael Dunn suggested. I also created a "Card" class that uses JLabel as its parent.
Hi Steve Stevenson,
Please show me demo in that uses true drag and drop or handling mouse events for moving the little Duke guy around, because I am working on drag and drop of images, I am making game like a rummy card game and using applet in my web application, so please give me the or show me the demo, those you saying in post.
Ganesh Gothi wrote: Hi Steve Stevenson,
Please show me demo in that uses true drag and drop or handling mouse events for moving the little Duke guy around, because I am working on drag and drop of images, I am making game like a rummy card game and using applet in my web application, so please give me the or show me the demo, those you saying in post.
It's actually inside that link, but this direct link ought to open up the app so that you can see it in action: