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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P5
    • Resolution: Unresolved
    • Affects Version/s: 8u60
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
      None
    • Subcomponent:
    • Introduced In Version:
    • CPU:
      x86_64
    • OS:
      windows_7

      Description

      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);
      }

      }

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: