Implementing "Kings' Corners" (glorified multiplayer Solitaire) in Java.
I'm trying to allow a player to drag a card (image) from their hand to somewhere else on the table. The problem is that the player's hand is "fanned" so the images of the cards are rotated and they overlap.
Here is an example of a hand:
I've considered making each card a JPanel
, but the issue then is that I'd have to paint the card rotated inside its rectangular JPanel
, as they themselves can't be rotated. Ideally I'd like to avoid mouse-x,y formulas to determine which card is being chosen.
Using an event-driven approach, how can I determine which card is chosen from the hand?