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

Wrong position of Popup windows at the intersection of 2 screens

XMLWordPrintable

    • b03

        Build Used : jdk-8u261+8247839

        When using two displays, there are wrong positions of GUI elements at the intersection of 2 screens with different scaling.

        Laptop 100%
        Monitor 175%

        Please find the attached image showing both the screens.
        _____

        Please run the following sample:

        import javafx.application.Application;
        import javafx.scene.*;
        import javafx.scene.control.*;
        import javafx.scene.layout.VBox;
        import javafx.stage.Stage;

        public class MenuApp extends Application {

            public Parent createContent() {

                VBox vbox = new VBox(20);
                vbox.setPrefSize(300, 200);
                final MenuBar menuBar = new MenuBar();
                Menu m1 = new Menu("one");
                m1.getItems().addAll(new MenuItem("111"), new MenuItem("222"));
                Menu m2 = new Menu("two");
                m2.getItems().addAll(new MenuItem("aaa"), new MenuItem("bbb"));
                Menu menu = new Menu("menu");
                menu.getItems().addAll(m1, m2);
                menuBar.getMenus().addAll(menu);
                vbox.getChildren().addAll(menuBar);
                return vbox;
            }

            @Override
            public void start(Stage primaryStage) throws Exception {
                primaryStage.setScene(new Scene(createContent()));
                primaryStage.show();
            }

            public static void main(String[] args) { launch(args); }
        }

          1. JDK-8251862.jpg
            24 kB
            Sureshkumar Mahaliswamy

              kcr Kevin Rushforth
              smahaliswamy Sureshkumar Mahaliswamy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: