I am searching on the Internet, but I cannot find how to set a custom cursor in javaFX with css , I know how to do it using the ImageCursorfollowing way:
ImageCursor
How to create a custom cursor in javaFX?
but I use this line in cssand not working:
css
setStyle("-fx-cursor:url('/images/pencil.png')");
Is it possible to create a costume with css?
When using a custom CSS cursor , a backup without a URL (one or more other values) should be at the end of the backup list, i.e. auto, so your code should look like this:
auto
//---------------------------------------------- ↓ setStyle("-fx-cursor:url('/images/pencil.png'),auto");