Skip to main content

how can i get mouse position(x,y) on current Frame?

3 replies [Last post]
expsan
Offline
Joined: 2008-06-12

sorry, i can't english well .

i am using JavaFX_NB_daily last version.

class MouseEvent's getCanvasX() and getCanvasY() is changed.

how can i get equal getCanvasX() and getCanvasY() value?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexsch
Offline
Joined: 2007-07-12

They have been replaced with getStageX() and getStageY().
See http://openjfx.java.sun.com/current-build/doc/api/index.html documentation,
javafx.input.MouseEvent class.

expsan
Offline
Joined: 2008-06-12

is there any different between getStateX() and getCanvasX() ?
it works differently in my application.

thanks for your help.

alexsch
Offline
Joined: 2007-07-12

They should be the same. Could you post an example there they have a different behaviour?