JDK-8184968 : Menu misalignment when using dual monitor setup
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8u141
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: other
  • CPU: x86
  • Submitted: 2017-07-19
  • Updated: 2017-08-18
  • Resolved: 2017-08-18
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
1.8.0_152-ea

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 10.0.14393]

A DESCRIPTION OF THE PROBLEM :
Using Windows 10 with a dual hi dpi monitor setup.
Monitor 1 has a resolution of 3360x2100
Monitor 2 has a resolution of 4096x2034

Monitor 1 is set as the main display.

If you run the test program and drag it to Monitor 2, you will notice that the menu is not aligned. I.e depending where the app is on the screen when you select the menu with the mouse, the actual menu pop up will be on another part of the screen. 

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the test application, drag it to the second monitor and select a menu item.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The menu should be aligned with the menu item selected.
ACTUAL -
The menu is not aligned with the menu selected.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
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); } 
} 
---------- END SOURCE ----------


Comments
No plans to address at this time for JDK 8. If there's a concern, please raise a Customer Support Case.
2017-08-18

Additional information from Submitter: This issue is not reproducible in JDK 9.
2017-07-27

Does it affect 9?
2017-07-25

Reopening this report, as received another report from same submitter where issue is reproducible in 8u141 also.
2017-07-25

please re-open to address questions above
2017-07-21

Does it affect 8u141? 8 GA? 9?
2017-07-21