-
Bug
-
Resolution: Unresolved
-
P5
-
8u60
-
None
-
x86_64
-
windows_7
I hope the code comment is self explaining.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.stage.Stage;
public class RunTest extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setScene(new Scene(new LineChart<>(new NumberAxis(), new NumberAxis())));
primaryStage.show();
primaryStage.centerOnScreen();
int parentPositionY = (int) primaryStage.getScene().getRoot().localToScreen(0, 0).getY();
System.out.println(parentPositionY);
// Win7, Screen: 1600x900
// ===============================================
// Real screen-Y of root is 170 with 8u51
// parentPositionY is 170 with 8u51
// ===============================================
// Real screen-Y of root is 171 with 8u60
// parentPositionY is 170 with 8u60 !!!!!!!!!!!!!!
}
public static void main(String[] args) {
launch(args);
}
}
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.stage.Stage;
public class RunTest extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setScene(new Scene(new LineChart<>(new NumberAxis(), new NumberAxis())));
primaryStage.show();
primaryStage.centerOnScreen();
int parentPositionY = (int) primaryStage.getScene().getRoot().localToScreen(0, 0).getY();
System.out.println(parentPositionY);
// Win7, Screen: 1600x900
// ===============================================
// Real screen-Y of root is 170 with 8u51
// parentPositionY is 170 with 8u51
// ===============================================
// Real screen-Y of root is 171 with 8u60
// parentPositionY is 170 with 8u60 !!!!!!!!!!!!!!
}
public static void main(String[] args) {
launch(args);
}
}