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

[macOS] Top of FileChooser window cut off when app window is full screen

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      os_x

      Description

      ADDITIONAL SYSTEM INFORMATION :
      MacOS 10.13.16
      Java 1.8u191

      A DESCRIPTION OF THE PROBLEM :
      On MacOSX 10.13.6 I have a two monitor set up. One monitor is the laptop monitor and the other is an external 4k screen.

      If you drag the supplied example app to the non main screen (i.e. the screen which doesn't have the menu bar if you go in to System Preferences->Displays->Arrangement) and make it full screen, if you then press the button which opens a FileChooser dialog, you will see that the top of the Dialog is cut off.

      There is no way of attaching screen shots, but I can supply them if needed to demonstrate the issue.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      To reproduce:
      1. Move the supplied example program over to the non main screen (i.e. the screen which doesn't have the menu bar if you go in to System Preferences->Displays->Arrangement)
      2. Make the app full screen
      3. Press the 'Open file dialog' button

      You will see that the top of the FileChoose is truncated.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The FileChooser dialog should not be cut off when in full screen.
      ACTUAL -
      The FileChooser dialog is cut off when in full screen.

      ---------- BEGIN SOURCE ----------
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.layout.StackPane;
      import javafx.stage.FileChooser;
      import javafx.stage.Stage;
       
      public class HelloWorld extends Application {
          public static void main(String[] args) {
              launch(args);
          }
          
          @Override
          public void start(Stage primaryStage) {
              primaryStage.setTitle("Hello World!");
              Button btn = new Button();
              btn.setText("Open file dialog");
              
              btn.setOnAction(event ->
              {
                  FileChooser fileChooser = new FileChooser();
                  fileChooser.setTitle("Open File");
                  fileChooser.showOpenDialog(primaryStage);
              });
              
              StackPane root = new StackPane();
              root.getChildren().add(btn);
              primaryStage.setScene(new Scene(root, 300, 250));
              primaryStage.show();
          }
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: