I'm new to javafx.
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
Label mouseCoordination = new Label("?,?");
mouseCoordination.setOnMouseMoved(e ->
mouseCoordination.setText(e.getX()+","+ e.getY())
);
StackPane root = new StackPane();
root.setPrefHeight(100);
root.setPrefWidth(400);
root.getChildren().add(mouseCoordination);
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
}
Here i tried to get mouse coordination, So i wrote this but it just work in short range like (0,0) to (48,17) and it doesn't update label after that. i actually wrote that in base of a question in site