java - Enlarging the click area of a line in javafx -


currently have sample application draws line , has onmouseclick listener on line.

however line hard hit because 1 pixel wide. make line wider when hover on makes easier aim ugly.

is there way make "target" area mouse click bigger line without making actual line bigger?

you can create line same startx, starty, endx, endy properties , make more thick setstrokewidth(10) , not visible setopacity(0) on it. after can handle mouse events new thick invisible line actual one.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -