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

DirectoryChooser dialog is not centered relative to the owner stage

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8u51
    • javafx

      A DESCRIPTION OF THE REQUEST :
      When we call showDialog(ownerWindow) on a DirectoryChooser object
      the dialog that shows up is not centered on the screen or centered relative to the ownerWindow.

      Instead it is positioned on the upper-left corner of the ownerWindow.

      The same issue applies to FileChooser dialog.

      This is a platform specific issue, since under Linux/Mac it shows up centered on the screen, but not relative to the ownerWindow.



      JUSTIFICATION :
      Since, this ability/functionality is already implemented in javax.swing.JFileChooser, why not in JavaFX ?

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The dialog should show up centered relative to the ownerWindow.
      ACTUAL -
      The dialog shows up on the upper-left corner of the ownerWindow.

      ---------- BEGIN SOURCE ----------
      import javafx.stage.DirectoryChooser;

      DirectoryChooser dirChooser = new DirectoryChooser();
      dirChooser.showDialog(ownerWindow);

      ---------- END SOURCE ----------

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: