Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8134310

[Windows] Y-position of Stage is calculated differently in some cases in 8u60

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P5 P5
    • tbd
    • 8u60
    • javafx
    • 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);
      }

      }

            Unassigned Unassigned
            aliebelt Andreas Liebelt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: