• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.awt.geom listeners  RSS feed

 
Node King
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi - this is my first time here. I love the moose - fly going up the nose is classic. I saw the name of this forum on the java.sun.com forums.

My question is about Ellipse2D.Floats - what is the best way to get them to perform an operation (a System.out.println statement for instance) if they, but not their background, are clicked on.

It isn't possible to add an ActionListener or ItemListener class.

Thanks a lot,

NKJ
 
Node King
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For reference I solved the problem by adding a mouselistener to the canvas that the circles were drawn on and then matching any click on those to the circles that were drawn on it using the "contains(xPos, yPos)" method.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!