|
Java™ by example!
|
|
|
How do I check for a mouseclick on one of my shapes?
This following example create an arbitrary shape using GeneralPath and allows you to click anywhere on the JFrame. If the mouseclick x and y coordinate are within the shape, e method contains will return true. Main.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|