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
Post a Comment