-2

Possible Duplicate:
How to find if image is clicked in JApplet?

Im figuring out the easiest way to do my game, and I think thats using a label with a mouse listener. The problem is I don't know how to add it to the applet with set, adjustable coordinates. Is there an easy way to do this?

Community
  • 1
  • 1
Ryley Matos
  • 137
  • 2
  • 2
  • 3

1 Answers1

1

Just use absolute positioning. By not using a layout manager you can place components in a panel or frame with the setLocation method.

component.setLocation(x,y);

Addendum: http://docs.oracle.com/javase/tutorial/uiswing/layout/none.html

Itchy Nekotorych
  • 882
  • 3
  • 10
  • 24