clicking on an image with transparency

Daniel Zwolenski zonski at
Thu Sep 27 20:43:17 PDT 2012

Have you tried playing with
I've never used it but based on previous discussions in this list it might
do something along the lines of what you need?

Probably more of a forum question though (so others can find the answer
next time).

Also for SVG check out:

On Fri, Sep 28, 2012 at 12:57 PM, Tom Eugelink <tbee at> wrote:

> In some of my controls I have some images that are being used as icons.
> When the user clicks on these icons, a popup should open or close. For
> these images I use PNGs with have some transparency in them and an
> onMouseClick event handler won't react on these transparent areas. So now I
> wrap the ImageView in a Pane and do the on-click on the pane. That works,
> but seems like a bit of overkill. Group won't do it.
> What is the best way to detect a mouse click on any area of an ImageView?
> Tom
> PS: I would have like to use SVG images, but apparently loading a SVG file
> is not part of JavaFX?

More information about the openjfx-dev mailing list