How would you implement "clickable" game elements, like they are buttons. But of course, they can move still.

  1. Make them buttons (or JLabels) in a JPanel and move them as required (use a null layout manager, set the button attributes to hide the usual borders etc)
  2. Just draw them on a JPanel and have code that checks the mouse click coordinates against the position/size/boundaries of each element to see which one (if any) the click was in

Without more info on your game its hard to say which would be a better choice for you.

commented: Thanks :) I'll give that a try +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.